From efff231ac33500beec8d724aad61564b9bd6f3dc Mon Sep 17 00:00:00 2001 From: "jean.chalard" Date: Mon, 24 Nov 2008 07:52:16 +0000 Subject: [PATCH] J : * Reserve some RAM for the vector before using it. --- JGE/src/winmain.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/JGE/src/winmain.cpp b/JGE/src/winmain.cpp index 89bcc8e05..e68a96deb 100644 --- a/JGE/src/winmain.cpp +++ b/JGE/src/winmain.cpp @@ -601,6 +601,7 @@ LRESULT CALLBACK WndProc( HWND hWnd, // Handle For This Window WPARAM wParam, // Additional Message Information LPARAM lParam) // Additional Message Information { + gKeyCodes.reserve(sizeof(gDefaultBindings)/sizeof(gDefaultBindings[0])); for (signed int i = sizeof(gDefaultBindings)/sizeof(gDefaultBindings[0]) - 1; i >= 0; --i) gKeyCodes[i] = make_pair(gDefaultBindings[i].keysym, gDefaultBindings[i].pspCode);