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

Commit

Permalink
Always use fully qualified boost::lambda::{bind,_1,_2}
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
AMDmi3 committed Feb 9, 2016
1 parent 0e8b89a commit 2be2b47
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 20 deletions.
6 changes: 3 additions & 3 deletions MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1898,8 +1898,8 @@ MainWindow::showInsertFileDialog(BeforeOrAfter before_or_after, ImageId const& e
ImageFileInfo image_file_info(file_info, std::vector<ImageMetadata>());

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

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

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

std::auto_ptr<FixDpiDialog> dpi_dialog(new FixDpiDialog(new_files, this));
dpi_dialog->setWindowModality(Qt::WindowModal);
Expand Down
10 changes: 5 additions & 5 deletions ThumbnailSequence.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ ThumbnailSequence::Impl::Impl(
m_pSelectionLeader(0)
{
m_graphicsScene.setContextMenuEventCallback(
bind(&Impl::sceneContextMenuEvent, this, _1)
boost::lambda::bind(&Impl::sceneContextMenuEvent, this, boost::lambda::_1)
);
}

Expand Down Expand Up @@ -605,7 +605,7 @@ ThumbnailSequence::Impl::invalidateThumbnail(PageInfo const& page_info)
{
ItemsById::iterator const id_it(m_itemsById.find(page_info.id()));
if (id_it != m_itemsById.end()) {
m_itemsById.modify(id_it, bind(&Item::pageInfo, _1) = page_info);
m_itemsById.modify(id_it, boost::lambda::bind(&Item::pageInfo, boost::lambda::_1) = page_info);
invalidateThumbnailImpl(id_it);
}
}
Expand Down Expand Up @@ -725,10 +725,10 @@ ThumbnailSequence::Impl::invalidateAllThumbnails()
// Sort pages in m_itemsInOrder using m_ptrOrderProvider.
if (m_ptrOrderProvider.get()) {
m_itemsInOrder.sort(
bind(
boost::lambda::bind(
&PageOrderProvider::precedes, m_ptrOrderProvider.get(),
bind(&Item::pageId, _1), bind(&Item::incompleteThumbnail, _1),
bind(&Item::pageId, _2), bind(&Item::incompleteThumbnail, _2)
boost::lambda::bind(&Item::pageId, boost::lambda::_1), bind(&Item::incompleteThumbnail, boost::lambda::_1),
boost::lambda::bind(&Item::pageId, boost::lambda::_2), bind(&Item::incompleteThumbnail, boost::lambda::_2)
)
);
}
Expand Down
4 changes: 2 additions & 2 deletions filters/deskew/Filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ Filter::saveSettings(ProjectWriter const& writer, QDomDocument& doc) const

QDomElement filter_el(doc.createElement("deskew"));
writer.enumPages(
bind(
boost::lambda::bind(
&Filter::writePageSettings,
this, boost::ref(doc), var(filter_el), _1, _2
this, boost::ref(doc), var(filter_el), boost::lambda::_1, boost::lambda::_2
)
);

Expand Down
4 changes: 2 additions & 2 deletions filters/fix_orientation/Filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ Filter::saveSettings(

QDomElement filter_el(doc.createElement("fix-orientation"));
writer.enumImages(
bind(
boost::lambda::bind(
&Filter::writeImageSettings,
this, boost::ref(doc), var(filter_el), _1, _2
this, boost::ref(doc), var(filter_el), boost::lambda::_1, boost::lambda::_2
)
);

Expand Down
4 changes: 2 additions & 2 deletions filters/output/Filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ Filter::saveSettings(

QDomElement filter_el(doc.createElement("output"));
writer.enumPages(
bind(
boost::lambda::bind(
&Filter::writePageSettings,
this, boost::ref(doc), var(filter_el), _1, _2
this, boost::ref(doc), var(filter_el), boost::lambda::_1, boost::lambda::_2
)
);

Expand Down
4 changes: 2 additions & 2 deletions filters/page_layout/Filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ Filter::saveSettings(

QDomElement filter_el(doc.createElement("page-layout"));
writer.enumPages(
bind(
boost::lambda::bind(
&Filter::writePageSettings,
this, boost::ref(doc), var(filter_el), _1, _2
this, boost::ref(doc), var(filter_el), boost::lambda::_1, boost::lambda::_2
)
);

Expand Down
4 changes: 2 additions & 2 deletions filters/page_split/Filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ Filter::saveSettings(
);

writer.enumImages(
bind(
boost::lambda::bind(
&Filter::writeImageSettings,
this, boost::ref(doc), var(filter_el), _1, _2
this, boost::ref(doc), var(filter_el), boost::lambda::_1, boost::lambda::_2
)
);

Expand Down
4 changes: 2 additions & 2 deletions filters/select_content/Filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ Filter::saveSettings(

QDomElement filter_el(doc.createElement("select-content"));
writer.enumPages(
bind(
boost::lambda::bind(
&Filter::writePageSettings,
this, boost::ref(doc), var(filter_el), _1, _2
this, boost::ref(doc), var(filter_el), boost::lambda::_1, boost::lambda::_2
)
);

Expand Down

0 comments on commit 2be2b47

Please sign in to comment.