From 4f72b5863172b7d4b9c868b8b56e4fbf55001e31 Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Thu, 16 Jul 2015 12:20:49 +0100 Subject: [PATCH] Compare message English strings. As the first strings in the vectors may not be for the same language. --- docs/LOOT Metadata Syntax.html | 2 +- src/backend/metadata/message.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/LOOT Metadata Syntax.html b/docs/LOOT Metadata Syntax.html index 5a2c07ba..52908f1f 100644 --- a/docs/LOOT Metadata Syntax.html +++ b/docs/LOOT Metadata Syntax.html @@ -451,7 +451,7 @@ nav: 0 afterMerged. If A and B both contain an entry with the same name value, B's copy is skipped. reqMerged. If A and B both contain an entry with the same name value, B's copy is skipped. incMerged. If A and B both contain an entry with the same name value, B's copy is skipped. - msgMerged. If A and B both contain an entry with the same content string (if there are multiple content strings, the first is checked), then B's copy is skipped. + msgMerged. If A and B both contain an entry with the same content string, then B's copy is skipped. If there are multiple content strings, the English strings are compared. tagMerged. If A and B both contain an entry with the same name value, B's copy is skipped, unless one is suggesting the tag for addition and the other is suggesting it for removal, in which case both entries are kept. urlCurrently skipped by the parser, so neither A nor B will contain any entries anyway. dirtyMerged. If A and B both contain an entry with the same crc value, B's copy is skipped. diff --git a/src/backend/metadata/message.cpp b/src/backend/metadata/message.cpp index b18fadab..f958d6d7 100644 --- a/src/backend/metadata/message.cpp +++ b/src/backend/metadata/message.cpp @@ -46,7 +46,7 @@ namespace loot { bool Message::operator < (const Message& rhs) const { if (!_content.empty() && !rhs.Content().empty()) - return boost::ilexicographical_compare(_content.front().Str(), rhs.Content().front().Str()); + return boost::ilexicographical_compare(ChooseContent(Language::english).Str(), rhs.ChooseContent(Language::english).Str()); else if (_content.empty() && !rhs.Content().empty()) return true; else @@ -115,4 +115,4 @@ namespace YAML { return out; } -} \ No newline at end of file +}