Compare message English strings.

As the first strings in the vectors may not be for the same language.
This commit is contained in:
Oliver Hamlet
2015-07-16 12:20:49 +01:00
parent 6e807f12bc
commit 4f72b58631
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -451,7 +451,7 @@ nav: 0
<tr><td><code>after</code><td>Merged. If A and B both contain an entry with the same <code>name</code> value, B's copy is skipped.
<tr><td><code>req</code><td>Merged. If A and B both contain an entry with the same <code>name</code> value, B's copy is skipped.
<tr><td><code>inc</code><td>Merged. If A and B both contain an entry with the same <code>name</code> value, B's copy is skipped.
<tr><td><code>msg</code><td>Merged. 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.
<tr><td><code>msg</code><td>Merged. 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.
<tr><td><code>tag</code><td>Merged. If A and B both contain an entry with the same <code>name</code> 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.
<tr><td><code>url</code><td>Currently skipped by the parser, so neither A nor B will contain any entries anyway.
<tr><td><code>dirty</code><td>Merged. If A and B both contain an entry with the same <code>crc</code> value, B's copy is skipped.
+2 -2
View File
@@ -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;
}
}
}