mirror of https://github.com/PCSX2/pcsx2.git
wxIsoFile branch: fix missing includes and gcc compilation stuffs.
git-svn-id: http://pcsx2.googlecode.com/svn/branches/wxIsoFile@3941 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
2b4d7cc384
commit
d5bc947e8d
|
@ -231,5 +231,5 @@ extern bool pxIsEnglish( int id );
|
||||||
#define pxE(key, english) pxExpandMsg( wxT(key), english )
|
#define pxE(key, english) pxExpandMsg( wxT(key), english )
|
||||||
|
|
||||||
#include "Utilities/ScopedPtr.h"
|
#include "Utilities/ScopedPtr.h"
|
||||||
#include "Utilities/ScopedMalloc.h"
|
#include "Utilities/ScopedAlloc.h"
|
||||||
#include "Utilities/Assertions.h"
|
#include "Utilities/Assertions.h"
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
namespace Exception
|
namespace Exception
|
||||||
{
|
{
|
||||||
int MakeNewType();
|
int MakeNewType();
|
||||||
BaseException* FromErrno( const wxString& streamname, errno_t errcode );
|
BaseException* FromErrno( const wxString& streamname, int errcode );
|
||||||
|
|
||||||
// --------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------
|
||||||
// BaseException
|
// BaseException
|
||||||
|
|
|
@ -154,21 +154,21 @@ public:
|
||||||
|
|
||||||
virtual void Alloc( size_t newsize )
|
virtual void Alloc( size_t newsize )
|
||||||
{
|
{
|
||||||
safe_free(m_buffer);
|
safe_free(this->m_buffer);
|
||||||
m_size = newsize;
|
this->m_size = newsize;
|
||||||
if (!m_size) return;
|
if (!m_size) return;
|
||||||
|
|
||||||
m_buffer = (T*)malloc( m_size * sizeof(T) );
|
this->m_buffer = (T*)malloc( m_size * sizeof(T) );
|
||||||
if (!m_buffer)
|
if (!this->m_buffer)
|
||||||
throw Exception::OutOfMemory("ScopedAlloc");
|
throw Exception::OutOfMemory("ScopedAlloc");
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void Resize( size_t newsize )
|
virtual void Resize( size_t newsize )
|
||||||
{
|
{
|
||||||
m_size = newsize;
|
this->m_size = newsize;
|
||||||
m_buffer = (T*)realloc(m_buffer * sizeof(T), newsize);
|
this->m_buffer = (T*)realloc(this->m_buffer * sizeof(T), newsize);
|
||||||
|
|
||||||
if (!m_buffer)
|
if (!this->m_buffer)
|
||||||
throw Exception::OutOfMemory("ScopedAlloc::Resize");
|
throw Exception::OutOfMemory("ScopedAlloc::Resize");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -198,21 +198,21 @@ public:
|
||||||
|
|
||||||
virtual void Alloc( size_t newsize )
|
virtual void Alloc( size_t newsize )
|
||||||
{
|
{
|
||||||
safe_aligned_free(m_buffer);
|
safe_aligned_free(this->m_buffer);
|
||||||
m_size = newsize;
|
this->m_size = newsize;
|
||||||
if (!m_size) return;
|
if (!this->m_size) return;
|
||||||
|
|
||||||
m_buffer = (T*)_aligned_malloc( m_size * sizeof(T), align );
|
this->m_buffer = (T*)_aligned_malloc( this->m_size * sizeof(T), align );
|
||||||
if (!m_buffer)
|
if (!this->m_buffer)
|
||||||
throw Exception::OutOfMemory(L"ScopedAlignedAlloc");
|
throw Exception::OutOfMemory(L"ScopedAlignedAlloc");
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void Resize( size_t newsize )
|
virtual void Resize( size_t newsize )
|
||||||
{
|
{
|
||||||
m_size = newsize;
|
this->m_size = newsize;
|
||||||
m_buffer = (T*)_aligned_realloc(m_buffer, newsize * sizeof(T), align);
|
this->m_buffer = (T*)_aligned_realloc(this->m_buffer, newsize * sizeof(T), align);
|
||||||
|
|
||||||
if (!m_buffer)
|
if (!this->m_buffer)
|
||||||
throw Exception::OutOfMemory(L"ScopedAlignedAlloc::Resize");
|
throw Exception::OutOfMemory(L"ScopedAlignedAlloc::Resize");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
#include "Dependencies.h"
|
#include "Dependencies.h"
|
||||||
#include "SafeArray.h"
|
#include "SafeArray.h"
|
||||||
#include "ScopedMalloc.h"
|
#include "ScopedAlloc.h"
|
||||||
|
|
||||||
#include <wx/tokenzr.h>
|
#include <wx/tokenzr.h>
|
||||||
|
|
||||||
|
|
|
@ -245,7 +245,7 @@ wxString Exception::Stream::FormatDisplayMessage() const
|
||||||
|
|
||||||
// Translates an Errno code into an exception.
|
// Translates an Errno code into an exception.
|
||||||
// Throws an exception based on the given error code (usually taken from ANSI C's errno)
|
// Throws an exception based on the given error code (usually taken from ANSI C's errno)
|
||||||
BaseException* Exception::FromErrno( const wxString& streamname, errno_t errcode )
|
BaseException* Exception::FromErrno( const wxString& streamname, int errcode )
|
||||||
{
|
{
|
||||||
pxAssumeDev( errcode != 0, "Invalid NULL error code? (errno)" );
|
pxAssumeDev( errcode != 0, "Invalid NULL error code? (errno)" );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue