vendor/tomotopy/src/Utils/Dictionary.h in tomoto-0.2.2 vs vendor/tomotopy/src/Utils/Dictionary.h in tomoto-0.2.3

- old
+ new

@@ -30,11 +30,11 @@ Vid add(const std::string& word) { auto it = dict.find(word); if (it == dict.end()) { - dict.emplace(std::make_pair(word, dict.size())); + dict.emplace(word, (Vid)dict.size()); id2word.emplace_back(word); return (Vid)(dict.size() - 1); } return it->second; } @@ -62,10 +62,10 @@ void serializerRead(std::istream& reader) { serializer::readMany(reader, serializer::to_key("Dict"), id2word); for (size_t i = 0; i < id2word.size(); ++i) { - dict.emplace(id2word[i], i); + dict.emplace(id2word[i], (Vid)i); } } void swap(Dictionary& rhs) { \ No newline at end of file