* Reserve some RAM for the vector before using it.
This commit is contained in:
jean.chalard
2008-11-24 07:52:16 +00:00
parent 8ca5ae74e0
commit efff231ac3

View File

@@ -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);