diff --git a/base/base_tests/newtype_test.cpp b/base/base_tests/newtype_test.cpp index 317e6067b3..680c5ce759 100644 --- a/base/base_tests/newtype_test.cpp +++ b/base/base_tests/newtype_test.cpp @@ -6,7 +6,7 @@ #include #include -namespace +namespace newtype_test { NEWTYPE(int, Int); @@ -112,4 +112,4 @@ UNIT_TEST(NewType_SimpleOutPut) sstr << Int(20); TEST_EQUAL(sstr.str(), "20", ()); } -} // namespace +} // namespace newtype_test diff --git a/base/base_tests/stl_helpers_tests.cpp b/base/base_tests/stl_helpers_tests.cpp index cc76540a42..523696b2cf 100644 --- a/base/base_tests/stl_helpers_tests.cpp +++ b/base/base_tests/stl_helpers_tests.cpp @@ -10,7 +10,7 @@ using namespace base; -namespace +namespace stl_helpers_test { class Int { @@ -153,7 +153,7 @@ UNIT_TEST(IgnoreFirstArgument) } } -namespace +namespace { struct EqualZero { @@ -326,4 +326,4 @@ UNIT_TEST(AccumulateIntervals) CheckAccumulateIntervals(idTest, arr1, arr2, res); } } -} // namespace +} // namespace stl_helpers_test diff --git a/base/base_tests/thread_safe_queue_tests.cpp b/base/base_tests/thread_safe_queue_tests.cpp index 0c53ce36e5..0d796fa403 100644 --- a/base/base_tests/thread_safe_queue_tests.cpp +++ b/base/base_tests/thread_safe_queue_tests.cpp @@ -13,7 +13,7 @@ using namespace base::thread_pool::delayed; UNIT_TEST(ThreadSafeQueue_ThreadSafeQueue) { - base::threads::ThreadSafeQueue queue; + threads::ThreadSafeQueue queue; TEST(queue.Empty(), ()); TEST_EQUAL(queue.Size(), 0, ()); @@ -22,7 +22,7 @@ UNIT_TEST(ThreadSafeQueue_ThreadSafeQueue) UNIT_TEST(ThreadSafeQueue_Push) { size_t const kSize = 100; - base::threads::ThreadSafeQueue queue; + threads::ThreadSafeQueue queue; ThreadPool pool(2, ThreadPool::Exit::ExecPending); for (size_t i = 0; i < kSize; ++i) { @@ -39,7 +39,7 @@ UNIT_TEST(ThreadSafeQueue_Push) UNIT_TEST(ThreadSafeQueue_WaitAndPop) { using namespace std::chrono_literals; - base::threads::ThreadSafeQueue queue; + threads::ThreadSafeQueue queue; size_t const value = 101; size_t result; auto thread = std::thread([&]() { @@ -57,7 +57,7 @@ UNIT_TEST(ThreadSafeQueue_WaitAndPop) UNIT_TEST(ThreadSafeQueue_TryPop) { using namespace std::chrono_literals; - base::threads::ThreadSafeQueue queue; + threads::ThreadSafeQueue queue; size_t const value = 101; size_t result; auto thread = std::thread([&]() { @@ -75,7 +75,7 @@ UNIT_TEST(ThreadSafeQueue_TryPop) UNIT_TEST(ThreadSafeQueue_ExampleWithDataWrapper) { size_t const kSize = 100000; - base::threads::ThreadSafeQueue> queue; + threads::ThreadSafeQueue> queue; auto thread = std::thread([&]() { while (true) diff --git a/base/thread_safe_queue.hpp b/base/thread_safe_queue.hpp index 7198b65fbe..b0e3cae8ef 100644 --- a/base/thread_safe_queue.hpp +++ b/base/thread_safe_queue.hpp @@ -5,8 +5,6 @@ #include #include -namespace base -{ namespace threads { template @@ -76,4 +74,3 @@ private: std::condition_variable m_cond; }; } // namespace threads -} // namespace base diff --git a/base/thread_utils.hpp b/base/thread_utils.hpp index b0857b246a..8a7dc17e29 100644 --- a/base/thread_utils.hpp +++ b/base/thread_utils.hpp @@ -5,8 +5,6 @@ #include "base/macros.hpp" -namespace base -{ namespace threads { template > @@ -77,4 +75,3 @@ private: DISALLOW_COPY(FunctionWrapper); }; } // namespace threads -} // namespace base diff --git a/generator/features_processing_helpers.hpp b/generator/features_processing_helpers.hpp index 203f6bbe23..369ddbe838 100644 --- a/generator/features_processing_helpers.hpp +++ b/generator/features_processing_helpers.hpp @@ -25,5 +25,5 @@ struct ProcessedData }; using FeatureProcessorChunk = std::optional>; -using FeatureProcessorQueue = base::threads::ThreadSafeQueue; +using FeatureProcessorQueue = threads::ThreadSafeQueue; } // namespace generator diff --git a/generator/translators_pool.cpp b/generator/translators_pool.cpp index fa9ec7b195..801c706235 100644 --- a/generator/translators_pool.cpp +++ b/generator/translators_pool.cpp @@ -31,7 +31,7 @@ bool TranslatorsPool::Finish() { m_threadPool.WaitingStop(); using TranslatorPtr = std::shared_ptr; - base::threads::ThreadSafeQueue> queue; + threads::ThreadSafeQueue> queue; while (!m_translators.Empty()) { std::promise p; diff --git a/generator/translators_pool.hpp b/generator/translators_pool.hpp index d2c4c73f2c..d1b907ede0 100644 --- a/generator/translators_pool.hpp +++ b/generator/translators_pool.hpp @@ -23,6 +23,6 @@ public: private: base::thread_pool::computational::ThreadPool m_threadPool; - base::threads::ThreadSafeQueue> m_translators; + threads::ThreadSafeQueue> m_translators; }; } // namespace generator diff --git a/iphone/Maps/Classes/FirstSession.h b/iphone/Maps/Classes/FirstSession.h index 80c6c9bfa2..e4d2c29c29 100644 --- a/iphone/Maps/Classes/FirstSession.h +++ b/iphone/Maps/Classes/FirstSession.h @@ -25,9 +25,10 @@ #ifndef FIRSTSESSION_H #define FIRSTSESSION_H +#import #import #import -#import +#import // TARGET_OS_IPHONE #if (TARGET_OS_IPHONE > 0) #import // enum UIBackgroundFetchResult diff --git a/iphone/Maps/Classes/FirstSession.mm b/iphone/Maps/Classes/FirstSession.mm index 4323b56f60..3532ffdddd 100644 --- a/iphone/Maps/Classes/FirstSession.mm +++ b/iphone/Maps/Classes/FirstSession.mm @@ -30,7 +30,6 @@ #include // std::pair #include -#include // TARGET_OS_IPHONE #import #import diff --git a/testing/testingmain.cpp b/testing/testingmain.cpp index b6b3e781b8..c2999062b3 100644 --- a/testing/testingmain.cpp +++ b/testing/testingmain.cpp @@ -22,7 +22,7 @@ # include "drape/drape_tests/gl_mock_functions.hpp" #endif -#ifdef TARGET_OS_IPHONE +#ifdef OMIM_OS_IPHONE # include #endif @@ -41,15 +41,9 @@ #endif #endif -using namespace std; - -namespace -{ -base::Waiter g_waiter; -} // namespace - namespace testing { +base::Waiter g_waiter; void RunEventLoop() { @@ -79,10 +73,7 @@ void Notify() { g_waiter.Notify(); } -} // namespace testing -namespace -{ bool g_lastTestOK = true; CommandLineOptions g_testingOptions; @@ -146,7 +137,6 @@ void ParseOptions(int argc, char * argv[], CommandLineOptions & options) options.m_listTests = true; } } -} // namespace CommandLineOptions const & GetTestingOptions() { @@ -307,3 +297,6 @@ int main(int argc, char * argv[]) LOG(LINFO, ("All tests passed.")); return STATUS_SUCCESS; } +} // namespace testing + +int main(int argc, char * argv[]) { return testing::main(argc, argv); }