Summary: | Kill BOOST_FOREACH on master and use C++11s range-based for() loops instead | ||
---|---|---|---|
Product: | LibreOffice | Reporter: | Björn Michaelsen <bjoern.michaelsen> |
Component: | Libreoffice | Assignee: | Nathan Yee <ny.nathan.yee> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | trivial | ||
Priority: | low | CC: | dtardon, libreoffice, m.weghorn, ny.nathan.yee, pieter.ad, qubit, sbergman |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | EasyHack DifficultyBeginner SkillCpp TopicCleanup target:4.5.0 | ||
i915 platform: | i915 features: |
Description
Björn Michaelsen
2014-12-04 13:31:36 UTC
Marking as enhancement Status -> NEW (In reply to Björn Michaelsen from comment #0) > Most uses of BOOST_FOREACH should be replacable with a simple C++11 > range-based for() iteration ...or for-each and a lambda (depending on what looks more "natural" in a given case) Assigned it to myself I've been working on this bug since there seems to not have been activity on this bug for more than a week. It seems like converting to range-based for loops is fairly trivial except in this specific case shown here: http://opengrok.libreoffice.org/xref/core/sw/source/core/doc/CntntIdxStore.cxx#271 Apparently range-based for loops cannot be used to iterate over an std::pair. Does anyone have any advice on how to resolve this issue? I have replaced all instances of BOOST_FOREACH in the project except for this one already. (In reply to Nathan Yee from comment #4) > http://opengrok.libreoffice.org/xref/core/sw/source/core/doc/CntntIdxStore. > cxx#271 > > Apparently range-based for loops cannot be used to iterate over an > std::pair. Does anyone have any advice on how to resolve this issue? Iterate over pRedlineTbl. That is what the current BOOST_FOREACH does, i.e., it iterates over a range defined by an std::pair of iterators. Sent a patch for this bug over gerrit at https://gerrit.libreoffice.org/13714. I'm going to assign this bug to myself for the time being. Nathan Yee committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=a509a8d9951a0c31bea0f4ff8942720cad8b6e7f Resolves: fdo#87003 Kill BOOST_FOREACH on master It will be available in 4.5.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback. Pieter Adriaensen committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=f29bf4635958f7d4b8a22c0825cbcca4858ba037 Resolves: fdo#87003 - Kill BOOST_FOREACH It will be available in 4.5.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.