From 3320c7c5ff97b585395beb15ab3f203822fd550e Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 3 May 2014 12:33:13 +0100 Subject: Use ids_equal() to compare IDs so that the comparison ignores extra whitespace and case. --- src/ref.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ref.h b/src/ref.h index c22222cc..287d5081 100644 --- a/src/ref.h +++ b/src/ref.h @@ -26,6 +26,7 @@ #include "exceptions.h" #include "object.h" +#include "util.h" #include #include @@ -69,7 +70,7 @@ public: void resolve (std::list > objects) { typename std::list >::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 (); } -- cgit v1.2.3