diff options
author | Maxim Pimenov <m@maps.me> | 2019-03-11 16:51:05 +0300 |
---|---|---|
committer | Maksim Andrianov <maksimandrianov1@gmail.com> | 2019-03-11 18:30:42 +0300 |
commit | c87cb978e62f1eb4850639abb299aba46d2e13f5 (patch) | |
tree | 3812afa8dc4084784dc350df1ca67f2c8d2d0729 /platform | |
parent | c1d4305454b1115fabca3e8f86ad80e0fce4f8e0 (diff) |
Several explicit constructors per the Cppcheck report.
Diffstat (limited to 'platform')
-rw-r--r-- | platform/http_request.cpp | 2 | ||||
-rw-r--r-- | platform/location_service.cpp | 2 | ||||
-rw-r--r-- | platform/platform_tests/apk_test.cpp | 3 | ||||
-rw-r--r-- | platform/wifi_location_service.cpp | 2 |
4 files changed, 4 insertions, 5 deletions
diff --git a/platform/http_request.cpp b/platform/http_request.cpp index f2dece1621..6169c6becf 100644 --- a/platform/http_request.cpp +++ b/platform/http_request.cpp @@ -155,7 +155,7 @@ class FileHttpRequest : public HttpRequest, public IHttpThreadCallback { int64_t m_pos; public: - ThreadByPos(int64_t pos) : m_pos(pos) {} + explicit ThreadByPos(int64_t pos) : m_pos(pos) {} inline bool operator() (ThreadHandleT const & p) const { return (p.second == m_pos); diff --git a/platform/location_service.cpp b/platform/location_service.cpp index ecffe373f3..52c9e1810e 100644 --- a/platform/location_service.cpp +++ b/platform/location_service.cpp @@ -71,7 +71,7 @@ namespace location } public: - DesktopLocationService(LocationObserver & observer) + explicit DesktopLocationService(LocationObserver & observer) : LocationService(observer), m_reportFirstEvent(true) { #if defined(OMIM_OS_MAC) diff --git a/platform/platform_tests/apk_test.cpp b/platform/platform_tests/apk_test.cpp index 83760b4e24..76f9094a50 100644 --- a/platform/platform_tests/apk_test.cpp +++ b/platform/platform_tests/apk_test.cpp @@ -41,9 +41,8 @@ namespace string const & m_cont; public: - ApkTester(string const & cont) : m_cont(cont) + explicit ApkTester(string const & cont) : m_cont(cont), m_hashes(COUNT) { - m_hashes.resize(COUNT); } virtual void Do() diff --git a/platform/wifi_location_service.cpp b/platform/wifi_location_service.cpp index 7f80c38add..f3ea900756 100644 --- a/platform/wifi_location_service.cpp +++ b/platform/wifi_location_service.cpp @@ -95,7 +95,7 @@ namespace location } public: - WiFiLocationService(LocationObserver & observer) : LocationService(observer) + explicit WiFiLocationService(LocationObserver & observer) : LocationService(observer) { } |