Cosmetics

This commit is contained in:
Birunthan Mohanathas 2012-05-30 09:56:20 +03:00
parent 9623766a61
commit dc35b31559
7 changed files with 22 additions and 40 deletions

View File

@ -449,7 +449,6 @@
<ClInclude Include="UpdateCheck.h" /> <ClInclude Include="UpdateCheck.h" />
<ClInclude Include="lua\LuaManager.h" /> <ClInclude Include="lua\LuaManager.h" />
<ClInclude Include="lua\LuaScript.h" /> <ClInclude Include="lua\LuaScript.h" />
<ClInclude Include="lua\include\lua.hpp" />
<ClInclude Include="lua\lua\luaconf.h" /> <ClInclude Include="lua\lua\luaconf.h" />
<ClInclude Include="lua\lua\lapi.h" /> <ClInclude Include="lua\lua\lapi.h" />
<ClInclude Include="lua\lua\lauxlib.h" /> <ClInclude Include="lua\lua\lauxlib.h" />

View File

@ -19,9 +19,6 @@
<Filter Include="Lua\glue"> <Filter Include="Lua\glue">
<UniqueIdentifier>{941dce28-a314-4492-befb-5770432c98bf}</UniqueIdentifier> <UniqueIdentifier>{941dce28-a314-4492-befb-5770432c98bf}</UniqueIdentifier>
</Filter> </Filter>
<Filter Include="Lua\Lua Headers">
<UniqueIdentifier>{45f9e20c-cd34-4e18-84f2-9090ee108656}</UniqueIdentifier>
</Filter>
<Filter Include="Lua\Lua"> <Filter Include="Lua\Lua">
<UniqueIdentifier>{c8550e7b-009b-4e12-a55a-ed458d05bdad}</UniqueIdentifier> <UniqueIdentifier>{c8550e7b-009b-4e12-a55a-ed458d05bdad}</UniqueIdentifier>
</Filter> </Filter>
@ -446,12 +443,6 @@
<ClInclude Include="lua\LuaScript.h"> <ClInclude Include="lua\LuaScript.h">
<Filter>Lua</Filter> <Filter>Lua</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="lua\include\lua.hpp">
<Filter>Lua\Lua Headers</Filter>
</ClInclude>
<ClInclude Include="lua\lua\luaconf.h">
<Filter>Lua\Lua Headers</Filter>
</ClInclude>
<ClInclude Include="lua\lua\lapi.h"> <ClInclude Include="lua\lua\lapi.h">
<Filter>Lua\Lua</Filter> <Filter>Lua\Lua</Filter>
</ClInclude> </ClInclude>
@ -548,6 +539,9 @@
<ClInclude Include="MathParser.h"> <ClInclude Include="MathParser.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="lua\lua\luaconf.h">
<Filter>Lua\Lua</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ResourceCompile Include="Library.rc"> <ResourceCompile Include="Library.rc">

View File

@ -45,7 +45,7 @@ void CMeasureMemory::UpdateValue()
{ {
MEMORYSTATUSEX stat; MEMORYSTATUSEX stat;
stat.dwLength = sizeof(MEMORYSTATUSEX); stat.dwLength = sizeof(MEMORYSTATUSEX);
GlobalMemoryStatusEx(&stat); // Doesn't measure values > 4GB. Should use GlobalMemoryStatusEx instead, but that requires Win2k. GlobalMemoryStatusEx(&stat);
if (m_Total) if (m_Total)
{ {
m_Value = (double)(__int64)(stat.ullTotalPageFile + stat.ullTotalPhys); m_Value = (double)(__int64)(stat.ullTotalPageFile + stat.ullTotalPhys);

View File

@ -53,7 +53,8 @@ void CMeasureRegistry::UpdateValue()
WCHAR* data = new WCHAR[size]; WCHAR* data = new WCHAR[size];
DWORD type = 0; DWORD type = 0;
if (RegQueryValueEx(m_RegKey, if (RegQueryValueEx(
m_RegKey,
m_RegValueName.c_str(), m_RegValueName.c_str(),
NULL, NULL,
(LPDWORD)&type, (LPDWORD)&type,
@ -64,7 +65,7 @@ void CMeasureRegistry::UpdateValue()
{ {
case REG_DWORD: case REG_DWORD:
m_Value = *((LPDWORD)data); m_Value = *((LPDWORD)data);
m_StringValue.erase(); m_StringValue.clear();
break; break;
case REG_SZ: case REG_SZ:
@ -76,18 +77,18 @@ void CMeasureRegistry::UpdateValue()
case REG_QWORD: case REG_QWORD:
m_Value = (double)((LARGE_INTEGER*)data)->QuadPart; m_Value = (double)((LARGE_INTEGER*)data)->QuadPart;
m_StringValue.erase(); m_StringValue.clear();
break; break;
default: // Other types are not supported default: // Other types are not supported
m_Value = 0.0; m_Value = 0.0;
m_StringValue.erase(); m_StringValue.clear();
} }
} }
else else
{ {
m_Value = 0.0; m_Value = 0.0;
m_StringValue.erase(); m_StringValue.clear();
RegOpenKeyEx(m_HKey, m_RegKeyName.c_str(), 0, KEY_READ, &m_RegKey); RegOpenKeyEx(m_HKey, m_RegKeyName.c_str(), 0, KEY_READ, &m_RegKey);
} }

View File

@ -19,7 +19,12 @@
#ifndef __LUAMANAGER_H__ #ifndef __LUAMANAGER_H__
#define __LUAMANAGER_H__ #define __LUAMANAGER_H__
#include "lua.hpp" extern "C"
{
#include "lua.h"
#include "lualib.h"
#include "lauxlib.h"
}
class LuaManager class LuaManager
{ {

View File

@ -19,7 +19,6 @@
#ifndef __LUASCRIPT_H__ #ifndef __LUASCRIPT_H__
#define __LUASCRIPT_H__ #define __LUASCRIPT_H__
#include "lua.hpp"
#include "LuaManager.h" #include "LuaManager.h"
class LuaScript class LuaScript

View File

@ -1,16 +0,0 @@
// lua.hpp
// Lua header files for C++
// <<extern "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