aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorOran Juice <oranjuices@hotmail.com>2014-10-02 22:36:02 +0530
committerOran Juice <oranjuices@hotmail.com>2014-10-02 22:36:02 +0530
commit3e6b6bad2d731ca778da9c3bcfdb1b1001a85cd7 (patch)
treee8d86864324b1d167b0826e51f12c41637549bfa /src
parentStop copying word list files to build directory (diff)
downloadmonero-3e6b6bad2d731ca778da9c3bcfdb1b1001a85cd7.tar.xz
Had missed const and had to use .at instead of []
Diffstat (limited to 'src')
-rw-r--r--src/mnemonics/electrum-words.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mnemonics/electrum-words.cpp b/src/mnemonics/electrum-words.cpp
index 053941194..4b1116815 100644
--- a/src/mnemonics/electrum-words.cpp
+++ b/src/mnemonics/electrum-words.cpp
@@ -100,8 +100,8 @@ namespace
for (std::vector<Language::Base*>::iterator it1 = language_instances.begin();
it1 != language_instances.end(); it1++)
{
- std::unordered_map<std::string, uint32_t> &word_map = (*it1)->get_word_map();
- std::unordered_map<std::string, uint32_t> &trimmed_word_map = (*it1)->get_trimmed_word_map();
+ const std::unordered_map<std::string, uint32_t> &word_map = (*it1)->get_word_map();
+ const std::unordered_map<std::string, uint32_t> &trimmed_word_map = (*it1)->get_trimmed_word_map();
// To iterate through seed words
std::vector<std::string>::const_iterator it2;
// To iterate through trimmed seed words
@@ -120,7 +120,7 @@ namespace
full_match = false;
break;
}
- matched_indices.push_back(trimmed_word_map[*it3]);
+ matched_indices.push_back(trimmed_word_map.at(*it3));
}
else
{
@@ -129,7 +129,7 @@ namespace
full_match = false;
break;
}
- matched_indices.push_back(word_map[*it2]);
+ matched_indices.push_back(word_map.at(*it2));
}
}
if (full_match)
@@ -305,7 +305,7 @@ namespace crypto
{
return false;
}
- std::vector<std::string> &word_list = language->get_word_list();
+ const std::vector<std::string> &word_list = language->get_word_list();
// To store the words for random access to add the checksum word later.
std::vector<std::string> words_store;