aboutsummaryrefslogtreecommitdiff
path: root/external/easylogging++/easylogging++.cc
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-05-31 20:22:37 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-10-23 20:26:46 +0000
commit6cd929eaa3fd2df4eaa3c9e1be747e400426e38a (patch)
treefa9b69c30b42205132ff234e352ce5c9566f0b57 /external/easylogging++/easylogging++.cc
parentMerge pull request #4697 (diff)
downloadmonero-6cd929eaa3fd2df4eaa3c9e1be747e400426e38a.tar.xz
easylogging++: remove std::deque usage
It's not actually needed for this use, and saves a STL header
Diffstat (limited to 'external/easylogging++/easylogging++.cc')
-rw-r--r--external/easylogging++/easylogging++.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/external/easylogging++/easylogging++.cc b/external/easylogging++/easylogging++.cc
index a4bdad4cf..1139008e2 100644
--- a/external/easylogging++/easylogging++.cc
+++ b/external/easylogging++/easylogging++.cc
@@ -1981,6 +1981,12 @@ void VRegistry::setCategories(const char* categories, bool clear) {
m_categoriesString += ",";
m_categoriesString += categories;
+ size_t n_fields = m_categories.size() + 1;
+ for (const char *ptr = categories; *ptr; ++ptr)
+ if (*ptr == ',')
+ ++n_fields;
+ m_categories.reserve(n_fields);
+
bool isCat = true;
bool isLevel = false;
std::stringstream ss;
@@ -2042,7 +2048,7 @@ bool VRegistry::allowed(Level level, const char* category) {
if (m_categories.empty() || category == nullptr) {
return false;
} else {
- std::deque<std::pair<std::string, Level>>::const_reverse_iterator it = m_categories.rbegin();
+ std::vector<std::pair<std::string, Level>>::const_reverse_iterator it = m_categories.rbegin();
for (; it != m_categories.rend(); ++it) {
if (base::utils::Str::wildCardMatch(category, it->first.c_str())) {
const int p = priority(it->second);