diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-05-03 12:33:13 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-05-03 12:33:13 +0100 |
| commit | 3320c7c5ff97b585395beb15ab3f203822fd550e (patch) | |
| tree | 9130011c0043b3f73c906c07d9d9ded3747682d3 /src | |
| parent | d003793402ee5e9c0ee2a5a7c96e03f67f7b84cc (diff) | |
Use ids_equal() to compare IDs so that the comparison ignores extra whitespace and case.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ref.h | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -26,6 +26,7 @@ #include "exceptions.h" #include "object.h" +#include "util.h" #include <boost/shared_ptr.hpp> #include <string> @@ -69,7 +70,7 @@ public: void resolve (std::list<boost::shared_ptr<Object> > objects) { typename std::list<boost::shared_ptr<Object> >::iterator i = objects.begin(); - while (i != objects.end() && (*i)->id() != _id) { + while (i != objects.end() && !ids_equal ((*i)->id(), _id)) { ++i; } @@ -90,7 +91,7 @@ public: if (!_object) { throw UnresolvedRefError (_id); } - + return _object; } @@ -101,7 +102,7 @@ public: if (!_object) { throw UnresolvedRefError (_id); } - + return _object.get (); } |
