[core] Fix google-explicit-constructor errors
As reported by clang-tidy-8.
This commit is contained in:
@@ -19,7 +19,7 @@ namespace mbgl {
|
||||
|
||||
class LocalFileSource::Impl {
|
||||
public:
|
||||
Impl(const ActorRef<Impl>&) {}
|
||||
explicit Impl(const ActorRef<Impl>&) {}
|
||||
|
||||
void request(const std::string& url, const ActorRef<FileSourceRequest>& req) {
|
||||
if (!acceptsURL(url)) {
|
||||
|
||||
@@ -46,9 +46,7 @@ void setTempPath(const std::string& path) {
|
||||
|
||||
class DatabaseImpl {
|
||||
public:
|
||||
DatabaseImpl(sqlite3* db_)
|
||||
: db(db_)
|
||||
{
|
||||
explicit DatabaseImpl(sqlite3* db_) : db(db_) {
|
||||
const int error = sqlite3_extended_result_codes(db, true);
|
||||
if (error != SQLITE_OK) {
|
||||
mbgl::Log::Warning(mbgl::Event::Database, error, "Failed to enable extended result codes: %s", sqlite3_errmsg(db));
|
||||
|
||||
@@ -12,10 +12,7 @@ namespace util {
|
||||
|
||||
class AsyncTask::Impl {
|
||||
public:
|
||||
Impl(std::function<void()>&& fn)
|
||||
: async(new uv_async_t),
|
||||
task(std::move(fn)) {
|
||||
|
||||
explicit Impl(std::function<void()> fn) : async(new uv_async_t), task(std::move(fn)) {
|
||||
auto* loop = reinterpret_cast<uv_loop_t*>(RunLoop::getLoopHandle());
|
||||
if (uv_async_init(loop, async, asyncCallback) != 0) {
|
||||
throw std::runtime_error("Failed to initialize async.");
|
||||
|
||||
@@ -79,8 +79,7 @@ static void on_error_message(j_common_ptr cinfo) {
|
||||
}
|
||||
|
||||
struct jpeg_info_guard {
|
||||
jpeg_info_guard(jpeg_decompress_struct* cinfo)
|
||||
: i_(cinfo) {}
|
||||
explicit jpeg_info_guard(jpeg_decompress_struct* cinfo) : i_(cinfo) {}
|
||||
|
||||
~jpeg_info_guard() {
|
||||
jpeg_destroy_decompress(i_);
|
||||
|
||||
Reference in New Issue
Block a user