From 93219f070fc01b82584a121e0a0d2beb97d01c3d Mon Sep 17 00:00:00 2001 From: Alex Zolotarev Date: Sun, 22 May 2011 16:54:21 +0200 Subject: [PATCH] Removed boost:: namespace and fixed boost includes --- map/framework.cpp | 4 ++-- map/framework.hpp | 5 +++-- platform/download_manager.hpp | 4 ++-- platform/location.hpp | 7 +++---- platform/platform_tests/download_test.cpp | 5 ++--- platform/wifi_info.hpp | 2 +- qt/mainwindow.cpp | 9 ++++++--- qt/update_dialog.cpp | 4 ++-- storage/storage.hpp | 17 ++++++++--------- 9 files changed, 29 insertions(+), 28 deletions(-) diff --git a/map/framework.cpp b/map/framework.cpp index 9d07e86b60..04b1ad5f97 100644 --- a/map/framework.cpp +++ b/map/framework.cpp @@ -379,9 +379,9 @@ void FrameWork::AddRedrawCommandSure() // initialize gps and compass subsystem GetLocationManager().SetGpsObserver( - boost::bind(&this_type::OnGpsUpdate, this, _1)); + bind(&this_type::OnGpsUpdate, this, _1)); GetLocationManager().SetCompassObserver( - boost::bind(&this_type::OnCompassUpdate, this, _1)); + bind(&this_type::OnCompassUpdate, this, _1)); // set language priorities languages::CodesT langCodes; diff --git a/map/framework.hpp b/map/framework.hpp index c3f8f6559d..b1b4e76691 100644 --- a/map/framework.hpp +++ b/map/framework.hpp @@ -39,6 +39,7 @@ #include "../base/mutex.hpp" #include "../std/bind.hpp" +#include "../std/function.hpp" #include "../std/vector.hpp" #include "../std/shared_ptr.hpp" #include "../std/target_os.hpp" @@ -53,7 +54,7 @@ class redraw_operation_cancelled {}; struct BenchmarkRectProvider; -typedef boost::function SearchCallbackT; +typedef function SearchCallbackT; namespace fwork { @@ -94,7 +95,7 @@ namespace fwork } -typedef boost::function LocationRetrievedCallbackT; +typedef function LocationRetrievedCallbackT; template < diff --git a/platform/download_manager.hpp b/platform/download_manager.hpp index e51c425776..e7b12a292a 100644 --- a/platform/download_manager.hpp +++ b/platform/download_manager.hpp @@ -15,7 +15,7 @@ struct HttpProgressT int64_t m_current; int64_t m_total; }; -typedef boost::function HttpProgressCallbackT; +typedef function HttpProgressCallbackT; enum DownloadResultT { @@ -34,7 +34,7 @@ struct HttpFinishedParams string m_data; //!< if not empty, contains received data DownloadResultT m_error; }; -typedef boost::function HttpFinishedCallbackT; +typedef function HttpFinishedCallbackT; struct HttpStartParams { diff --git a/platform/location.hpp b/platform/location.hpp index 3409bf6a7c..76008bf526 100644 --- a/platform/location.hpp +++ b/platform/location.hpp @@ -2,8 +2,7 @@ #include "../std/string.hpp" #include "../std/vector.hpp" - -#include +#include "../std/function.hpp" namespace location { @@ -53,8 +52,8 @@ namespace location int m_z; }; - typedef boost::function TGpsCallback; - typedef boost::function TCompassCallback; + typedef function TGpsCallback; + typedef function TCompassCallback; class LocationService { diff --git a/platform/platform_tests/download_test.cpp b/platform/platform_tests/download_test.cpp index 0bda75ce3a..0a01c68b53 100644 --- a/platform/platform_tests/download_test.cpp +++ b/platform/platform_tests/download_test.cpp @@ -6,10 +6,9 @@ #include "../../coding/file_writer.hpp" #include "../../coding/file_reader.hpp" -#include -#include +#include "../../std/bind.hpp" -#include "../../base/start_mem_debug.hpp" +#include // file on the server contains "Test1" #define TEST_FILE_URL1 "http://melnichek.ath.cx:34568/unit_tests/1.txt" diff --git a/platform/wifi_info.hpp b/platform/wifi_info.hpp index 3873d51869..f7e7992fdb 100644 --- a/platform/wifi_info.hpp +++ b/platform/wifi_info.hpp @@ -20,7 +20,7 @@ public: WiFiInfo(); ~WiFiInfo(); - typedef boost::function const &)> WifiRequestCallbackT; + typedef function const &)> WifiRequestCallbackT; void RequestWiFiBSSIDs(WifiRequestCallbackT callback); /// Stops any active updates void Stop(); diff --git a/qt/mainwindow.cpp b/qt/mainwindow.cpp index 2b577564b7..246ac8ce98 100644 --- a/qt/mainwindow.cpp +++ b/qt/mainwindow.cpp @@ -7,8 +7,11 @@ #include "../defines.hpp" #include "../search/search_processor.hpp" + #include "../map/settings.hpp" +#include "../std/bind.hpp" + #include #include #include @@ -176,7 +179,7 @@ void MainWindow::LoadState() m_pDrawWidget->UpdateNow(); } -namespace +namespace { struct button_t { @@ -306,7 +309,7 @@ void MainWindow::OnMyPosition() { m_pMyPositionAction->setIcon(QIcon(":/navig64/location-search.png")); m_pMyPositionAction->setToolTip(tr("Looking for position...")); - m_pDrawWidget->OnEnableMyPosition(boost::bind(&MainWindow::OnLocationFound, this)); + m_pDrawWidget->OnEnableMyPosition(bind(&MainWindow::OnLocationFound, this)); } else { @@ -352,7 +355,7 @@ void MainWindow::OnSearchTextChanged(QString const & str) table->setRowCount(0); if (!str.isEmpty()) m_pDrawWidget->Search(str.toUtf8().constData(), - boost::bind(&MainWindow::OnSearchResult, this, _1)); + bind(&MainWindow::OnSearchResult, this, _1)); } void MainWindow::OnSearchResult(search::Result const & result) diff --git a/qt/update_dialog.cpp b/qt/update_dialog.cpp index 53d987e70a..e361001491 100644 --- a/qt/update_dialog.cpp +++ b/qt/update_dialog.cpp @@ -5,7 +5,7 @@ #include "../map/settings.hpp" -#include +#include "../std/bind.hpp" #include #include @@ -40,7 +40,7 @@ enum #define COLOR_INQUEUE Qt::gray namespace qt -{ +{ /////////////////////////////////////////////////////////////////////////////// // Helpers /////////////////////////////////////////////////////////////////////////////// diff --git a/storage/storage.hpp b/storage/storage.hpp index 38e41fd60c..4ba939a04e 100644 --- a/storage/storage.hpp +++ b/storage/storage.hpp @@ -11,8 +11,7 @@ #include "../std/list.hpp" #include "../std/string.hpp" #include "../std/set.hpp" - -#include +#include "../std/function.hpp" namespace storage { @@ -79,9 +78,9 @@ namespace storage /// @name Communicate with GUI //@{ - typedef boost::function TObserverChangeCountryFunction; - typedef boost::function TObserverProgressFunction; - typedef boost::function TUpdateRequestFunction; + typedef function TObserverChangeCountryFunction; + typedef function TObserverProgressFunction; + typedef function TUpdateRequestFunction; TObserverChangeCountryFunction m_observerChange; TObserverProgressFunction m_observerProgress; TUpdateRequestFunction m_observerUpdateRequest; @@ -90,10 +89,10 @@ namespace storage /// @name Communicate with Framework //@{ public: - typedef boost::function TAddMapFunction; - typedef boost::function TRemoveMapFunction; - typedef boost::function TUpdateRectFunction; - typedef boost::function TEnumMapsFunction; + typedef function TAddMapFunction; + typedef function TRemoveMapFunction; + typedef function TUpdateRectFunction; + typedef function TEnumMapsFunction; private: TAddMapFunction m_addMap;