From 3ef870227df0bd36771a85fd45e862a3239aa50f Mon Sep 17 00:00:00 2001 From: NN Date: Sat, 6 Jun 2015 23:19:35 +0300 Subject: [PATCH] Use unordered_map --- .../src/ScitillaComponent/ScintillaEditView.h | 4 ++-- .../ScitillaComponent/UserDefineDialog.cpp | 4 ++-- .../src/ScitillaComponent/UserDefineDialog.h | 20 +++++++++---------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/PowerEditor/src/ScitillaComponent/ScintillaEditView.h b/PowerEditor/src/ScitillaComponent/ScintillaEditView.h index f218b83eb..f06e64403 100644 --- a/PowerEditor/src/ScitillaComponent/ScintillaEditView.h +++ b/PowerEditor/src/ScitillaComponent/ScintillaEditView.h @@ -669,8 +669,8 @@ protected: bool _lineNumbersShown; bool _wrapRestoreNeeded; - typedef std::map StyleMap; - typedef std::map BufferStyleMap; + typedef std::unordered_map StyleMap; + typedef std::unordered_map BufferStyleMap; BufferStyleMap _hotspotStyles; int _beginSelectPosition; diff --git a/PowerEditor/src/ScitillaComponent/UserDefineDialog.cpp b/PowerEditor/src/ScitillaComponent/UserDefineDialog.cpp index 9c34dda77..1c441633c 100644 --- a/PowerEditor/src/ScitillaComponent/UserDefineDialog.cpp +++ b/PowerEditor/src/ScitillaComponent/UserDefineDialog.cpp @@ -1641,7 +1641,7 @@ INT_PTR CALLBACK StylerDlg::dlgProc(HWND hwnd, UINT message, WPARAM wParam, LPAR dlg->_pFgColour->display(); dlg->_pBgColour->display(); - map::iterator iter = globalMappper().nestingMapper.begin(); + unordered_map::iterator iter = globalMappper().nestingMapper.begin(); for (; iter != globalMappper().nestingMapper.end(); ++iter) { ::SendDlgItemMessage(hwnd, iter->first, BM_SETCHECK, style._nesting & iter->second, 0); @@ -1730,7 +1730,7 @@ INT_PTR CALLBACK StylerDlg::dlgProc(HWND hwnd, UINT message, WPARAM wParam, LPAR style._fontStyle |= FONTSTYLE_UNDERLINE; style._nesting = SCE_USER_MASK_NESTING_NONE; - map::iterator iter = globalMappper().nestingMapper.begin(); + unordered_map::iterator iter = globalMappper().nestingMapper.begin(); for (; iter != globalMappper().nestingMapper.end(); ++iter) { if (BST_CHECKED == ::SendMessage(::GetDlgItem(hwnd, iter->first), BM_GETCHECK, 0, 0)) diff --git a/PowerEditor/src/ScitillaComponent/UserDefineDialog.h b/PowerEditor/src/ScitillaComponent/UserDefineDialog.h index 26bd63027..2ae1fa2d1 100644 --- a/PowerEditor/src/ScitillaComponent/UserDefineDialog.h +++ b/PowerEditor/src/ScitillaComponent/UserDefineDialog.h @@ -51,7 +51,7 @@ static int max(int a, int b) { #endif //__GNUC__ #include "tchar.h" #include "scilexer.h" -#include +#include class ScintillaEditView; class UserLangContainer; @@ -66,18 +66,18 @@ class GlobalMappers { public: - std::map keywordIdMapper; - std::map keywordNameMapper; + std::unordered_map keywordIdMapper; + std::unordered_map keywordNameMapper; - std::map styleIdMapper; - std::map styleNameMapper; + std::unordered_map styleIdMapper; + std::unordered_map styleNameMapper; - std::map temp; - std::map::iterator iter; + std::unordered_map temp; + std::unordered_map::iterator iter; - std::map nestingMapper; - std::map dialogMapper; - std::map setLexerMapper; + std::unordered_map nestingMapper; + std::unordered_map dialogMapper; + std::unordered_map setLexerMapper; // only default constructor is needed GlobalMappers()