aboutsummaryrefslogtreecommitdiff
path: root/src/IconbarTool.cc
diff options
context:
space:
mode:
authorGlen Whitney <glen@studioinfinity.org>2022-10-25 15:53:19 (GMT)
committerMathias Gumz <mgumz@users.noreply.github.com>2024-11-25 20:23:51 (GMT)
commit823ca2e181df0c056875c4c901a37d86b60b4256 (patch)
tree30f54ee20b3a7b37cfd328f1abd9ff1e8d944bf0 /src/IconbarTool.cc
parent06993a4ac8261f1ea6876d7593b14cf43103214b (diff)
downloadfluxbox-823ca2e181df0c056875c4c901a37d86b60b4256.zip
fluxbox-823ca2e181df0c056875c4c901a37d86b60b4256.tar.bz2
chore: remove compiler warnings
Most warnings were caused by deprecated std library templates, especially std::mem_fun, std::bind1st, and std::bind2nd. These are replaced by their modern versions, std::mem_fn and std::bind.
Diffstat (limited to 'src/IconbarTool.cc')
-rw-r--r--src/IconbarTool.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/IconbarTool.cc b/src/IconbarTool.cc
index 027ab1c..f88c91c 100644
--- a/src/IconbarTool.cc
+++ b/src/IconbarTool.cc
@@ -60,6 +60,8 @@ using std::string;
60using std::list; 60using std::list;
61using std::endl; 61using std::endl;
62 62
63using namespace std::placeholders;
64
63namespace FbTk { 65namespace FbTk {
64 66
65template<> 67template<>
@@ -367,13 +369,13 @@ void IconbarTool::setMode(string mode) {
367 mode + " (iconhidden=no)")); 369 mode + " (iconhidden=no)"));
368 if (m_winlist.get()) { 370 if (m_winlist.get()) {
369 m_winlist->addSig().connect( 371 m_winlist->addSig().connect(
370 std::bind1st(FbTk::MemFun(*this, &IconbarTool::update), LIST_ADD) 372 std::bind(FbTk::MemFun(*this, &IconbarTool::update), LIST_ADD, _1)
371 ); 373 );
372 m_winlist->removeSig().connect( 374 m_winlist->removeSig().connect(
373 std::bind1st(FbTk::MemFun(*this, &IconbarTool::update), LIST_REMOVE) 375 std::bind(FbTk::MemFun(*this, &IconbarTool::update), LIST_REMOVE, _1)
374 ); 376 );
375 m_winlist->addSig().connect( 377 m_winlist->addSig().connect(
376 std::bind1st(FbTk::MemFun(*this, &IconbarTool::update), LIST_ORDER) 378 std::bind(FbTk::MemFun(*this, &IconbarTool::update), LIST_ORDER, _1)
377 ); 379 );
378 m_winlist->resetSig().connect(FbTk::MemFunBind( 380 m_winlist->resetSig().connect(FbTk::MemFunBind(
379 *this, &IconbarTool::update, LIST_RESET, static_cast<Focusable *>(0) 381 *this, &IconbarTool::update, LIST_RESET, static_cast<Focusable *>(0)
@@ -518,7 +520,7 @@ void IconbarTool::updateSizing() {
518 m_icon_container.setBorderColor(m_theme.border().color()); 520 m_icon_container.setBorderColor(m_theme.border().color());
519 521
520 FbTk::STLUtil::forAll(m_icons, 522 FbTk::STLUtil::forAll(m_icons,
521 FbTk::Compose(std::mem_fun(&IconButton::reconfigTheme), 523 FbTk::Compose(std::mem_fn(&IconButton::reconfigTheme),
522 FbTk::Select2nd<IconMap::value_type>())); 524 FbTk::Select2nd<IconMap::value_type>()));
523 525
524} 526}