Cleanup; fixed tons of warnings, set up the project to treat warnings as errors

This commit is contained in:
parax0
2015-11-24 03:22:37 -07:00
parent 367cb6c3d8
commit 5ffa24592c
39 changed files with 90 additions and 929 deletions

View File

@@ -134,7 +134,7 @@ void CRenderer::SetBloom(EBloomMode BloomMode)
mOptions &= ~eEnableBloom;
}
void CRenderer::SetFont(CFont *pFont)
void CRenderer::SetFont(CFont* /*pFont*/)
{
}
@@ -199,8 +199,8 @@ void CRenderer::RenderBloom()
CColor((u8) 53, 53, 53, 255),
CColor((u8) 17, 17, 17, 255) };
float BloomWidth = (mBloomMode == eBloom ? mBloomWidth : mViewportWidth);
float BloomHeight = (mBloomMode == eBloom ? mBloomHeight : mViewportHeight);
u32 BloomWidth = (mBloomMode == eBloom ? mBloomWidth : mViewportWidth);
u32 BloomHeight = (mBloomMode == eBloom ? mBloomHeight : mViewportHeight);
float BloomHScale = (mBloomMode == eBloom ? mBloomHScale : 0);
float BloomVScale = (mBloomMode == eBloom ? mBloomVScale : 0);

View File

@@ -7,7 +7,11 @@ namespace Log
{
static const TString gskLogFilename = "primeworldeditor.log";
#pragma warning(push)
#pragma warning(disable: 4996) // Can't use fopen_s here without creating a separate init function for the log
FILE *gpLogFile = fopen(*gskLogFilename, "w");
#pragma warning(pop)
void Write(const TString& message)
{
@@ -16,9 +20,11 @@ void Write(const TString& message)
time_t RawTime;
time(&RawTime);
tm *pTimeInfo = localtime(&RawTime);
tm pTimeInfo;
localtime_s(&pTimeInfo, &RawTime);
char Buffer[80];
strftime(Buffer, 80, "[%H:%M:%S]", pTimeInfo);
strftime(Buffer, 80, "[%H:%M:%S]", &pTimeInfo);
fprintf(gpLogFile, "%s %s\n", Buffer, *message);
fflush(gpLogFile);

View File

@@ -3,6 +3,7 @@
#include <QStyleFactory>
#include <UI/CDarkStyle.h>
#include <Resource/factory/CTemplateLoader.h>
#include <Common/TString.h>
int main(int argc, char *argv[])
{