From: Peter Kümmel Date: Tue, 4 Sep 2007 18:35:58 +0000 (+0000) Subject: move getSecond to frontend_helpers.h X-Git-Tag: 1.6.10~8508 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=9862ca834e74f2263c67f1884aa5943fd20396c0;p=features.git move getSecond to frontend_helpers.h git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20044 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/frontends/controllers/frontend_helpers.h b/src/frontends/controllers/frontend_helpers.h index 79fa3adea5..eeecc52791 100644 --- a/src/frontends/controllers/frontend_helpers.h +++ b/src/frontends/controllers/frontend_helpers.h @@ -69,6 +69,16 @@ std::vector const getBarData(); /// std::vector const getColorData(); +/// +template +std::vector const +getSecond(std::vector const & pr) +{ + std::vector tmp(pr.size()); + std::transform(pr.begin(), pr.end(), tmp.begin(), + boost::bind(&Pair::second, _1)); + return tmp; +} /// typedef std::pair LanguagePair; diff --git a/src/frontends/qt4/GuiDocument.cpp b/src/frontends/qt4/GuiDocument.cpp index 5486867ead..3abbc52a37 100644 --- a/src/frontends/qt4/GuiDocument.cpp +++ b/src/frontends/qt4/GuiDocument.cpp @@ -170,15 +170,6 @@ void PreambleModule::closeEvent(QCloseEvent * e) // ///////////////////////////////////////////////////////////////////// -template -std::vector const -getSecond(std::vector const & pr) -{ - std::vector tmp(pr.size()); - std::transform(pr.begin(), pr.end(), tmp.begin(), - boost::bind(&Pair::second, _1)); - return tmp; -} GuiDocumentDialog::GuiDocumentDialog(GuiDocument * form) : form_(form), lang_(getSecond(getLanguageData(false))) diff --git a/src/frontends/qt4/GuiGraphics.cpp b/src/frontends/qt4/GuiGraphics.cpp index 1add51bffc..b63d2462f5 100644 --- a/src/frontends/qt4/GuiGraphics.cpp +++ b/src/frontends/qt4/GuiGraphics.cpp @@ -390,16 +390,6 @@ static int getItemNo(const vector & v, string const & s) return (cit != v.end()) ? int(cit - v.begin()) : 0; } -template -std::vector const -getSecond(std::vector const & pr) -{ - std::vector tmp(pr.size()); - std::transform(pr.begin(), pr.end(), tmp.begin(), - boost::bind(&Pair::second, _1)); - return tmp; -} - void GuiGraphics::update_contents() { diff --git a/src/frontends/qt4/GuiPrefs.cpp b/src/frontends/qt4/GuiPrefs.cpp index 398b03ea14..c86e31c329 100644 --- a/src/frontends/qt4/GuiPrefs.cpp +++ b/src/frontends/qt4/GuiPrefs.cpp @@ -1573,17 +1573,6 @@ void PrefFileformats::remove_format() // ///////////////////////////////////////////////////////////////////// -template -std::vector const -getSecond(std::vector const & pr) -{ - std::vector tmp(pr.size()); - std::transform(pr.begin(), pr.end(), tmp.begin(), - boost::bind(&Pair::second, _1)); - return tmp; -} - - PrefLanguage::PrefLanguage(QWidget * parent) : PrefModule(_("Language"), 0, parent) {