Make one arg ctors explicit

This commit is contained in:
Thiago Marcos P. Santos
2015-07-10 19:24:32 +03:00
parent bd8210d5a1
commit 00308be140
6 changed files with 6 additions and 6 deletions

View File

@@ -17,7 +17,7 @@ namespace mbgl {
class AssetZipContext : public AssetContext {
public:
AssetZipContext(uv_loop_t *loop);
explicit AssetZipContext(uv_loop_t *loop);
~AssetZipContext();
RequestBase* createRequest(const Resource& resource,

View File

@@ -60,7 +60,7 @@ class HTTPCURLContext : public HTTPContext {
MBGL_STORE_THREAD(tid)
public:
HTTPCURLContext(uv_loop_t *loop);
explicit HTTPCURLContext(uv_loop_t *loop);
~HTTPCURLContext();
RequestBase* createRequest(const Resource&,

View File

@@ -14,7 +14,7 @@ namespace mbgl {
class SQLiteCache::Impl {
public:
Impl(const std::string &path = ":memory:");
explicit Impl(const std::string &path = ":memory:");
~Impl();
void get(const Resource&, Callback);

View File

@@ -73,7 +73,7 @@ void TileWorker::redoPlacement(float angle, bool collisionDebug) {
template <typename T>
struct PropertyEvaluator {
typedef T result_type;
PropertyEvaluator(float z_) : z(z_) {}
explicit PropertyEvaluator(float z_) : z(z_) {}
template <typename P, typename std::enable_if<std::is_convertible<P, T>::value, int>::type = 0>
T operator()(const P &value) const {

View File

@@ -14,7 +14,7 @@ namespace mbgl {
class Worker::Impl {
public:
Impl(FileSource* fs) {
explicit Impl(FileSource* fs) {
// FIXME: Workers should not access the FileSource but it
// is currently needed because of GlyphsPBF. See #1664.
util::ThreadContext::setFileSource(fs);

View File

@@ -16,7 +16,7 @@ class LiveTile;
class Worker : public mbgl::util::noncopyable {
public:
Worker(std::size_t count);
explicit Worker(std::size_t count);
~Worker();
// Request work be done on a thread pool. Callbacks are executed on the invoking