Removed boost:: prefix for bind calls (sometimes bind from tr2 can be used)

This commit is contained in:
Alex Zolotarev 2011-02-16 11:52:07 +01:00 committed by Alex Zolotarev
parent 08a1d43923
commit d87fba4671
5 changed files with 32 additions and 32 deletions

View file

@ -143,7 +143,7 @@ void ClassifObject::VisLoadPolicy::Start(size_t i)
void ClassifObject::Sort()
{
sort(m_objs.begin(), m_objs.end(), less_name_t());
for_each(m_objs.begin(), m_objs.end(), boost::bind(&ClassifObject::Sort, _1));
for_each(m_objs.begin(), m_objs.end(), bind(&ClassifObject::Sort, _1));
}
void ClassifObject::Swap(ClassifObject & r)

View file

@ -118,7 +118,7 @@ class FrameWork
void AddRedrawCommandSure()
{
m_renderQueue.AddCommand(boost::bind(&this_type::PaintImpl, this, _1, _2, _3, _4), m_navigator.Screen());
m_renderQueue.AddCommand(bind(&this_type::PaintImpl, this, _1, _2, _3, _4), m_navigator.Screen());
}
void AddRedrawCommand()
@ -208,7 +208,7 @@ public:
if (!fin)
break;
m_navigator.SetFromRect(m2::RectD(x0, y0, x1, y1));
m_renderQueue.AddBenchmarkCommand(boost::bind(&this_type::PaintImpl, this, _1, _2, _3, _4), m_navigator.Screen());
m_renderQueue.AddBenchmarkCommand(bind(&this_type::PaintImpl, this, _1, _2, _3, _4), m_navigator.Screen());
m_benchmarks.push_back(make_pair(name, m2::RectD(x0, y0, x1, y1)));
}
Invalidate();
@ -230,8 +230,8 @@ public:
m_model.InitClassificator();
// initializes model with locally downloaded maps
storage.Init( boost::bind(&FrameWork::AddMap, this, _1),
boost::bind(&FrameWork::RemoveMap, this, _1));
storage.Init(bind(&FrameWork::AddMap, this, _1),
bind(&FrameWork::RemoveMap, this, _1));
}
bool IsEmptyModel()

View file

@ -28,10 +28,10 @@ public:
/// Throws FileAbsentException
/// @param[in] file just file name which we want to read
/// @param[out] fullPath fully resolved path including file name
/// @return false if file is absent
/// @return fullPath fully resolved path including file name
virtual string ReadPathForFile(char const * file) const = 0;
/// Throws FileAbsentException
/// @return fullPath fully resolved path including file name
string ReadPathForFile(string const & file) const
{
return ReadPathForFile(file.c_str());

View file

@ -96,8 +96,8 @@ UNIT_TEST(SingleDownload)
FileWriter::DeleteFile(TEST_FILE_NAME1);
gMgr.DownloadFile(TEST_FILE_URL1, TEST_FILE_NAME1,
boost::bind(&DlObserver<NUM>::OnDownloadFinished, &observer, _1, _2),
boost::bind(&DlObserver<NUM>::OnDownloadProgress, &observer, _1, _2));
bind(&DlObserver<NUM>::OnDownloadFinished, &observer, _1, _2),
bind(&DlObserver<NUM>::OnDownloadProgress, &observer, _1, _2));
WAIT_FOR_ASYNC_DOWNLOAD;
TEST_EQUAL( observer.m_result[0], EHttpDownloadOk, ("Do you have internet connection?") );
TEST( gPlatform.IsFileExists(TEST_FILE_NAME1), () );
@ -113,14 +113,14 @@ UNIT_TEST(MultiDownload)
FileWriter::DeleteFile(TEST_FILE_NAME2);
FileWriter::DeleteFile(TEST_FILE_NAME3);
gMgr.DownloadFile(TEST_FILE_URL1, TEST_FILE_NAME1,
boost::bind(&DlObserver<NUM>::OnDownloadFinished, &observer, _1, _2),
boost::bind(&DlObserver<NUM>::OnDownloadProgress, &observer, _1, _2));
bind(&DlObserver<NUM>::OnDownloadFinished, &observer, _1, _2),
bind(&DlObserver<NUM>::OnDownloadProgress, &observer, _1, _2));
gMgr.DownloadFile(TEST_FILE_URL2, TEST_FILE_NAME2,
boost::bind(&DlObserver<NUM>::OnDownloadFinished, &observer, _1, _2),
boost::bind(&DlObserver<NUM>::OnDownloadProgress, &observer, _1, _2));
bind(&DlObserver<NUM>::OnDownloadFinished, &observer, _1, _2),
bind(&DlObserver<NUM>::OnDownloadProgress, &observer, _1, _2));
gMgr.DownloadFile(TEST_FILE_URL3, TEST_FILE_NAME3,
boost::bind(&DlObserver<NUM>::OnDownloadFinished, &observer, _1, _2),
boost::bind(&DlObserver<NUM>::OnDownloadProgress, &observer, _1, _2));
bind(&DlObserver<NUM>::OnDownloadFinished, &observer, _1, _2),
bind(&DlObserver<NUM>::OnDownloadProgress, &observer, _1, _2));
WAIT_FOR_ASYNC_DOWNLOAD;
TEST_EQUAL( observer.m_result[0], EHttpDownloadOk, ("Do you have internet connection?") );
@ -144,8 +144,8 @@ UNIT_TEST(InvalidUrl)
observer.m_result[0] = EHttpDownloadOk;
gMgr.DownloadFile(TEST_INVALID_URL, TEST_FILE_NAME1,
boost::bind(&DlObserver<NUM>::OnDownloadFinished, &observer, _1, _2),
boost::bind(&DlObserver<NUM>::OnDownloadProgress, &observer, _1, _2));
bind(&DlObserver<NUM>::OnDownloadFinished, &observer, _1, _2),
bind(&DlObserver<NUM>::OnDownloadProgress, &observer, _1, _2));
WAIT_FOR_ASYNC_DOWNLOAD;
TEST_EQUAL( observer.m_result[0], EHttpDownloadFailed, () );
@ -184,8 +184,8 @@ UNIT_TEST(DownloadFileExists)
}
gMgr.DownloadFile(TEST_FILE_URL1, TEST_FILE_NAME1,
boost::bind(&DlObserver<NUM>::OnDownloadFinished, &observer, _1, _2),
boost::bind(&DlObserver<NUM>::OnDownloadProgress, &observer, _1, _2));
bind(&DlObserver<NUM>::OnDownloadFinished, &observer, _1, _2),
bind(&DlObserver<NUM>::OnDownloadProgress, &observer, _1, _2));
WAIT_FOR_ASYNC_DOWNLOAD;
TEST_EQUAL( observer.m_result[0], EHttpDownloadOk, () );
@ -212,16 +212,16 @@ UNIT_TEST(DownloadResume)
DlObserver<NUM> observer1;
gMgr.DownloadFile(TEST_FILE_URL1, TEST_FILE_NAME1,
boost::bind(&DlObserver<NUM>::OnDownloadFinished, &observer1, _1, _2),
boost::bind(&DlObserver<NUM>::OnDownloadProgress, &observer1, _1, _2),
bind(&DlObserver<NUM>::OnDownloadFinished, &observer1, _1, _2),
bind(&DlObserver<NUM>::OnDownloadProgress, &observer1, _1, _2),
false);
WAIT_FOR_ASYNC_DOWNLOAD;
TEST_EQUAL( observer1.m_result[0], EHttpDownloadOk, () );
DlObserver<NUM> observer2;
gMgr.DownloadFile(TEST_FILE_URL1, TEST_FILE_NAME2,
boost::bind(&DlObserver<NUM>::OnDownloadFinished, &observer2, _1, _2),
boost::bind(&DlObserver<NUM>::OnDownloadProgress, &observer2, _1, _2),
bind(&DlObserver<NUM>::OnDownloadFinished, &observer2, _1, _2),
bind(&DlObserver<NUM>::OnDownloadProgress, &observer2, _1, _2),
false);
WAIT_FOR_ASYNC_DOWNLOAD;
TEST_EQUAL( observer2.m_result[0], EHttpDownloadOk, () );
@ -239,8 +239,8 @@ UNIT_TEST(DownloadResume)
}
DlObserver<NUM> observer3;
gMgr.DownloadFile(TEST_FILE_URL1, TEST_FILE_NAME1,
boost::bind(&DlObserver<NUM>::OnDownloadFinished, &observer3, _1, _2),
boost::bind(&DlObserver<NUM>::OnDownloadProgress, &observer3, _1, _2),
bind(&DlObserver<NUM>::OnDownloadFinished, &observer3, _1, _2),
bind(&DlObserver<NUM>::OnDownloadProgress, &observer3, _1, _2),
true);
WAIT_FOR_ASYNC_DOWNLOAD;
TEST_EQUAL( observer3.m_result[0], EHttpDownloadOk, () );
@ -265,8 +265,8 @@ UNIT_TEST(DownloadAbsentFile)
DlObserver<NUM> observer;
gMgr.DownloadFile(TEST_ABSENT_FILE_URL, TEST_ABSENT_FILE_NAME,
boost::bind(&DlObserver<NUM>::OnDownloadFinished, &observer, _1, _2),
boost::bind(&DlObserver<NUM>::OnDownloadProgress, &observer, _1, _2));
bind(&DlObserver<NUM>::OnDownloadFinished, &observer, _1, _2),
bind(&DlObserver<NUM>::OnDownloadProgress, &observer, _1, _2));
WAIT_FOR_ASYNC_DOWNLOAD;
TEST_EQUAL( observer.m_result[0], EHttpDownloadFileNotFound, () );
@ -287,8 +287,8 @@ UNIT_TEST(DownloadLockedFile)
TEST( GetPlatform().IsFileExists(TEST_LOCKED_FILE_NAME), () );
gMgr.DownloadFile(TEST_LOCKED_FILE_URL, TEST_LOCKED_FILE_NAME,
boost::bind(&DlObserver<NUM>::OnDownloadFinished, &observer, _1, _2),
boost::bind(&DlObserver<NUM>::OnDownloadProgress, &observer, _1, _2));
bind(&DlObserver<NUM>::OnDownloadFinished, &observer, _1, _2),
bind(&DlObserver<NUM>::OnDownloadProgress, &observer, _1, _2));
WAIT_FOR_ASYNC_DOWNLOAD;
TEST_EQUAL( observer.m_result[0], EHttpDownloadFileIsLocked, () );

View file

@ -160,8 +160,8 @@ namespace storage
GetDownloadManager().DownloadFile(
(UpdateBaseUrl() + UrlEncode(it->first)).c_str(),
(GetPlatform().WritablePathForFile(it->first).c_str()),
boost::bind(&Storage::OnMapDownloadFinished, this, _1, _2),
boost::bind(&Storage::OnMapDownloadProgress, this, _1, _2),
bind(&Storage::OnMapDownloadFinished, this, _1, _2),
bind(&Storage::OnMapDownloadProgress, this, _1, _2),
true); // enabled resume support by default
// notify GUI - new status for country, "Downloading"
if (m_observerChange)
@ -336,7 +336,7 @@ namespace storage
GetDownloadManager().DownloadFile(
update.c_str(),
(GetPlatform().WritablePathForFile(UPDATE_CHECK_FILE)).c_str(),
boost::bind(&Storage::OnUpdateDownloadFinished, this, _1, _2),
bind(&Storage::OnDataUpdateCheckFinished, this, _1, _2),
TDownloadProgressFunction(), false);
}