Boost logo

Boost-Commit :

From: steven_at_[hidden]
Date: 2008-08-13 20:15:56


Author: steven_watanabe
Date: 2008-08-13 20:15:56 EDT (Wed, 13 Aug 2008)
New Revision: 48135
URL: http://svn.boost.org/trac/boost/changeset/48135

Log:
Make sure that we stay in the same file when trying to determine what entity a line refers to
Text files modified:
   sandbox/tools/profile_templates/src/postprocess.cpp | 6 ++----
   1 files changed, 2 insertions(+), 4 deletions(-)

Modified: sandbox/tools/profile_templates/src/postprocess.cpp
==============================================================================
--- sandbox/tools/profile_templates/src/postprocess.cpp (original)
+++ sandbox/tools/profile_templates/src/postprocess.cpp 2008-08-13 20:15:56 EDT (Wed, 13 Aug 2008)
@@ -148,10 +148,8 @@
                 int line = boost::lexical_cast<int>(match[2].str());
                 std::set<line_id>::const_iterator pos = lines.lower_bound(line_id(file, line));
                 if(pos != lines.end()) {
- if(*pos != line_id(file, line)) {
- if(pos != lines.begin()) {
- --pos;
- }
+ if(*pos != line_id(file, line) && pos != lines.begin() && boost::prior(pos)->first == file) {
+ --pos;
                     }
                 } else if(pos != lines.begin()) {
                     --pos;


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk