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="lua\LuaManager.h" />
<ClInclude Include="lua\LuaScript.h" />
<ClInclude Include="lua\include\lua.hpp" />
<ClInclude Include="lua\lua\luaconf.h" />
<ClInclude Include="lua\lua\lapi.h" />
<ClInclude Include="lua\lua\lauxlib.h" />

View File

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

View File

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

View File

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

View File

@ -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
{

View File

@ -19,7 +19,6 @@
#ifndef __LUASCRIPT_H__
#define __LUASCRIPT_H__
#include "lua.hpp"
#include "LuaManager.h"
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