Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Engine/COMInitializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@

COMInitializer::COMInitializer()
{
hr = CoInitializeEx( NULL,COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE );
hr = CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE);
}

COMInitializer::~COMInitializer()
{
if( hr == S_OK )
if (hr == S_OK)
{
CoUninitialize();
}
Expand Down
2 changes: 1 addition & 1 deletion Engine/COMInitializer.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ class COMInitializer
~COMInitializer();
private:
HRESULT hr;
};
};
21 changes: 14 additions & 7 deletions Engine/ChiliException.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,36 +20,43 @@
******************************************************************************************/
#pragma once
#include <string>
#include <utility>

class ChiliException
{
public:
ChiliException( const wchar_t* file,unsigned int line,const std::wstring& note = L"" )
ChiliException(const wchar_t* file, unsigned int line, std::wstring note = L"")
:
note( note ),
file( file ),
line( line )
{}
note(std::move(note)),
file(file),
line(line)
{
}

const std::wstring& GetNote() const
{
return note;
}

const std::wstring& GetFile() const
{
return file;
}

unsigned int GetLine() const
{
return line;
}

std::wstring GetLocation() const
{
return std::wstring( L"Line [" ) + std::to_wstring( line ) + L"] in " + file;
return std::wstring(L"Line [") + std::to_wstring(line) + L"] in " + file;
}

virtual std::wstring GetFullMessage() const = 0;
virtual std::wstring GetExceptionType() const = 0;
private:
std::wstring note;
std::wstring file;
unsigned int line;
};
};
2 changes: 1 addition & 1 deletion Engine/ChiliWin.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@

#define STRICT

#include <Windows.h>
#include <Windows.h>
Loading