diff options
author | Kazumasa Mitsunari <knimitz@witz-inc.co.jp> | 2018-06-12 08:47:16 +0900 |
---|---|---|
committer | Kazumasa Mitsunari <knimitz@witz-inc.co.jp> | 2018-06-12 09:24:06 +0900 |
commit | 924df5ddaf2f79cb4e7597661acc3840f9844a59 (patch) | |
tree | a6df7ed7549f218b2ca5753a2f83b424787c7d53 /src/applist.cpp | |
parent | 5dd3cfcc31b87c26cfd8f5cd4ba437082e181f1b (diff) |
Reserve default size for list
Change-Id: I2c3a340ca73665382a8ac816c11391d708e9bfbd
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
Diffstat (limited to 'src/applist.cpp')
-rw-r--r-- | src/applist.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/applist.cpp b/src/applist.cpp index 13e677c..06c1d86 100644 --- a/src/applist.cpp +++ b/src/applist.cpp @@ -22,14 +22,17 @@ using std::shared_ptr; using std::string; using std::vector; +const static int kReserveReqSize = 10; +const static int kReserveCLSize = 100; + namespace wm { AppList::AppList() - : req_list(0), - app2client(0), - current_req(1) + : current_req(1) { + req_list.reserve(kReserveReqSize); + app2client.reserve(kReserveCLSize); } void AppList::addClient(const string &appid, const string &role) |