Skip to content
This repository was archived by the owner on Nov 29, 2020. It is now read-only.

Commit 2be2b47

Browse files
committed
Always use fully qualified boost::lambda::{bind,_1,_2}
With boost 1.60 there's a namespace conflict between boost::bind and boost::lambda::bind and placeholders are no longer in global namespace, so use fully qualified names for these.
1 parent 0e8b89a commit 2be2b47

File tree

8 files changed

+20
-20
lines changed

8 files changed

+20
-20
lines changed

MainWindow.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1898,8 +1898,8 @@ MainWindow::showInsertFileDialog(BeforeOrAfter before_or_after, ImageId const& e
18981898
ImageFileInfo image_file_info(file_info, std::vector<ImageMetadata>());
18991899

19001900
ImageMetadataLoader::Status const status = ImageMetadataLoader::load(
1901-
files.at(i), bind(&std::vector<ImageMetadata>::push_back,
1902-
boost::ref(image_file_info.imageInfo()), _1)
1901+
files.at(i), boost::lambda::bind(&std::vector<ImageMetadata>::push_back,
1902+
boost::ref(image_file_info.imageInfo()), boost::lambda::_1)
19031903
);
19041904

19051905
if (status == ImageMetadataLoader::LOADED) {
@@ -1921,7 +1921,7 @@ MainWindow::showInsertFileDialog(BeforeOrAfter before_or_after, ImageId const& e
19211921
}
19221922

19231923
// Check if there is at least one DPI that's not OK.
1924-
if (std::find_if(new_files.begin(), new_files.end(), !bind(&ImageFileInfo::isDpiOK, _1)) != new_files.end()) {
1924+
if (std::find_if(new_files.begin(), new_files.end(), !boost::lambda::bind(&ImageFileInfo::isDpiOK, boost::lambda::_1)) != new_files.end()) {
19251925

19261926
std::auto_ptr<FixDpiDialog> dpi_dialog(new FixDpiDialog(new_files, this));
19271927
dpi_dialog->setWindowModality(Qt::WindowModal);

ThumbnailSequence.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ ThumbnailSequence::Impl::Impl(
491491
m_pSelectionLeader(0)
492492
{
493493
m_graphicsScene.setContextMenuEventCallback(
494-
bind(&Impl::sceneContextMenuEvent, this, _1)
494+
boost::lambda::bind(&Impl::sceneContextMenuEvent, this, boost::lambda::_1)
495495
);
496496
}
497497

@@ -605,7 +605,7 @@ ThumbnailSequence::Impl::invalidateThumbnail(PageInfo const& page_info)
605605
{
606606
ItemsById::iterator const id_it(m_itemsById.find(page_info.id()));
607607
if (id_it != m_itemsById.end()) {
608-
m_itemsById.modify(id_it, bind(&Item::pageInfo, _1) = page_info);
608+
m_itemsById.modify(id_it, boost::lambda::bind(&Item::pageInfo, boost::lambda::_1) = page_info);
609609
invalidateThumbnailImpl(id_it);
610610
}
611611
}
@@ -725,10 +725,10 @@ ThumbnailSequence::Impl::invalidateAllThumbnails()
725725
// Sort pages in m_itemsInOrder using m_ptrOrderProvider.
726726
if (m_ptrOrderProvider.get()) {
727727
m_itemsInOrder.sort(
728-
bind(
728+
boost::lambda::bind(
729729
&PageOrderProvider::precedes, m_ptrOrderProvider.get(),
730-
bind(&Item::pageId, _1), bind(&Item::incompleteThumbnail, _1),
731-
bind(&Item::pageId, _2), bind(&Item::incompleteThumbnail, _2)
730+
boost::lambda::bind(&Item::pageId, boost::lambda::_1), bind(&Item::incompleteThumbnail, boost::lambda::_1),
731+
boost::lambda::bind(&Item::pageId, boost::lambda::_2), bind(&Item::incompleteThumbnail, boost::lambda::_2)
732732
)
733733
);
734734
}

filters/deskew/Filter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ Filter::saveSettings(ProjectWriter const& writer, QDomDocument& doc) const
8585

8686
QDomElement filter_el(doc.createElement("deskew"));
8787
writer.enumPages(
88-
bind(
88+
boost::lambda::bind(
8989
&Filter::writePageSettings,
90-
this, boost::ref(doc), var(filter_el), _1, _2
90+
this, boost::ref(doc), var(filter_el), boost::lambda::_1, boost::lambda::_2
9191
)
9292
);
9393

filters/fix_orientation/Filter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ Filter::saveSettings(
100100

101101
QDomElement filter_el(doc.createElement("fix-orientation"));
102102
writer.enumImages(
103-
bind(
103+
boost::lambda::bind(
104104
&Filter::writeImageSettings,
105-
this, boost::ref(doc), var(filter_el), _1, _2
105+
this, boost::ref(doc), var(filter_el), boost::lambda::_1, boost::lambda::_2
106106
)
107107
);
108108

filters/output/Filter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ Filter::saveSettings(
9191

9292
QDomElement filter_el(doc.createElement("output"));
9393
writer.enumPages(
94-
bind(
94+
boost::lambda::bind(
9595
&Filter::writePageSettings,
96-
this, boost::ref(doc), var(filter_el), _1, _2
96+
this, boost::ref(doc), var(filter_el), boost::lambda::_1, boost::lambda::_2
9797
)
9898
);
9999

filters/page_layout/Filter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,9 @@ Filter::saveSettings(
136136

137137
QDomElement filter_el(doc.createElement("page-layout"));
138138
writer.enumPages(
139-
bind(
139+
boost::lambda::bind(
140140
&Filter::writePageSettings,
141-
this, boost::ref(doc), var(filter_el), _1, _2
141+
this, boost::ref(doc), var(filter_el), boost::lambda::_1, boost::lambda::_2
142142
)
143143
);
144144

filters/page_split/Filter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@ Filter::saveSettings(
110110
);
111111

112112
writer.enumImages(
113-
bind(
113+
boost::lambda::bind(
114114
&Filter::writeImageSettings,
115-
this, boost::ref(doc), var(filter_el), _1, _2
115+
this, boost::ref(doc), var(filter_el), boost::lambda::_1, boost::lambda::_2
116116
)
117117
);
118118

filters/select_content/Filter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,9 @@ Filter::saveSettings(
119119

120120
QDomElement filter_el(doc.createElement("select-content"));
121121
writer.enumPages(
122-
bind(
122+
boost::lambda::bind(
123123
&Filter::writePageSettings,
124-
this, boost::ref(doc), var(filter_el), _1, _2
124+
this, boost::ref(doc), var(filter_el), boost::lambda::_1, boost::lambda::_2
125125
)
126126
);
127127

0 commit comments

Comments
 (0)