From dc35b31559a33e1ff7a491b9b809f4b0897d7954 Mon Sep 17 00:00:00 2001 From: Birunthan Mohanathas Date: Wed, 30 May 2012 09:56:20 +0300 Subject: [PATCH] Cosmetics --- Library/Library.vcxproj | 1 - Library/Library.vcxproj.filters | 12 +++--------- Library/MeasureMemory.cpp | 2 +- Library/MeasureRegistry.cpp | 21 +++++++++++---------- Library/lua/LuaManager.h | 9 +++++++-- Library/lua/LuaScript.h | 1 - Library/lua/include/lua.hpp | 16 ---------------- 7 files changed, 22 insertions(+), 40 deletions(-) delete mode 100644 Library/lua/include/lua.hpp diff --git a/Library/Library.vcxproj b/Library/Library.vcxproj index 689c48cf..a20dd0d8 100644 --- a/Library/Library.vcxproj +++ b/Library/Library.vcxproj @@ -449,7 +449,6 @@ - diff --git a/Library/Library.vcxproj.filters b/Library/Library.vcxproj.filters index 597cc339..c9d2d621 100644 --- a/Library/Library.vcxproj.filters +++ b/Library/Library.vcxproj.filters @@ -19,9 +19,6 @@ {941dce28-a314-4492-befb-5770432c98bf} - - {45f9e20c-cd34-4e18-84f2-9090ee108656} - {c8550e7b-009b-4e12-a55a-ed458d05bdad} @@ -446,12 +443,6 @@ Lua - - Lua\Lua Headers - - - Lua\Lua Headers - Lua\Lua @@ -548,6 +539,9 @@ Header Files + + Lua\Lua + diff --git a/Library/MeasureMemory.cpp b/Library/MeasureMemory.cpp index 6c69fa1e..e84198c6 100644 --- a/Library/MeasureMemory.cpp +++ b/Library/MeasureMemory.cpp @@ -45,7 +45,7 @@ void CMeasureMemory::UpdateValue() { MEMORYSTATUSEX stat; stat.dwLength = sizeof(MEMORYSTATUSEX); - GlobalMemoryStatusEx(&stat); // Doesn't measure values > 4GB. Should use GlobalMemoryStatusEx instead, but that requires Win2k. + GlobalMemoryStatusEx(&stat); if (m_Total) { m_Value = (double)(__int64)(stat.ullTotalPageFile + stat.ullTotalPhys); diff --git a/Library/MeasureRegistry.cpp b/Library/MeasureRegistry.cpp index 6b0a5e5a..bf0a0dc0 100644 --- a/Library/MeasureRegistry.cpp +++ b/Library/MeasureRegistry.cpp @@ -53,18 +53,19 @@ void CMeasureRegistry::UpdateValue() WCHAR* data = new WCHAR[size]; DWORD type = 0; - if (RegQueryValueEx(m_RegKey, - m_RegValueName.c_str(), - NULL, - (LPDWORD)&type, - (LPBYTE)data, - (LPDWORD)&size) == ERROR_SUCCESS) + if (RegQueryValueEx( + m_RegKey, + m_RegValueName.c_str(), + NULL, + (LPDWORD)&type, + (LPBYTE)data, + (LPDWORD)&size) == ERROR_SUCCESS) { switch (type) { case REG_DWORD: m_Value = *((LPDWORD)data); - m_StringValue.erase(); + m_StringValue.clear(); break; case REG_SZ: @@ -76,18 +77,18 @@ void CMeasureRegistry::UpdateValue() case REG_QWORD: m_Value = (double)((LARGE_INTEGER*)data)->QuadPart; - m_StringValue.erase(); + m_StringValue.clear(); break; default: // Other types are not supported m_Value = 0.0; - m_StringValue.erase(); + m_StringValue.clear(); } } else { m_Value = 0.0; - m_StringValue.erase(); + m_StringValue.clear(); RegOpenKeyEx(m_HKey, m_RegKeyName.c_str(), 0, KEY_READ, &m_RegKey); } diff --git a/Library/lua/LuaManager.h b/Library/lua/LuaManager.h index 42d0a208..709c2068 100644 --- a/Library/lua/LuaManager.h +++ b/Library/lua/LuaManager.h @@ -18,8 +18,13 @@ #ifndef __LUAMANAGER_H__ #define __LUAMANAGER_H__ - -#include "lua.hpp" + +extern "C" +{ +#include "lua.h" +#include "lualib.h" +#include "lauxlib.h" +} class LuaManager { diff --git a/Library/lua/LuaScript.h b/Library/lua/LuaScript.h index 2d9b7b46..d87f792e 100644 --- a/Library/lua/LuaScript.h +++ b/Library/lua/LuaScript.h @@ -19,7 +19,6 @@ #ifndef __LUASCRIPT_H__ #define __LUASCRIPT_H__ -#include "lua.hpp" #include "LuaManager.h" class LuaScript diff --git a/Library/lua/include/lua.hpp b/Library/lua/include/lua.hpp deleted file mode 100644 index 4ddeafe7..00000000 --- a/Library/lua/include/lua.hpp +++ /dev/null @@ -1,16 +0,0 @@ -// lua.hpp -// Lua header files for C++ -// <> not supplied automatically because Lua also compiles as C++ - -extern "C" { -#include "lua.h" -#include "lualib.h" -#include "lauxlib.h" -} - - -#ifdef _RELEASE - -#else if _DEBUG - -#endif