1
0
forked from 0ad/0ad

Linux/GCC Compat

This was SVN commit r819.
This commit is contained in:
Simon Brenner 2004-07-27 00:26:51 +00:00
parent d6a68ad232
commit 386900c0fc
3 changed files with 13 additions and 7 deletions

View File

@ -1156,7 +1156,7 @@ void CGUI::Xeromyces_ReadObject(XMBElement Element, CXeromyces* pFile, IGUIObjec
if (pFile->getAttributeString(attr.Name).substr(0, 6) == "sprite")
{
// Check whether it's a special stretched one
std::string SpriteName = CStr8(attr.Value);
std::string SpriteName = CStr8(attr.Value).c_str();
if (SpriteName.substr(0, 10) == "stretched:" &&
m_Sprites.find(SpriteName) == m_Sprites.end() )
{
@ -1267,7 +1267,7 @@ void CGUI::Xeromyces_ReadObject(XMBElement Element, CXeromyces* pFile, IGUIObjec
Handle h = vfs_open(file);
if (h <= 0)
{
LOG(ERROR, "Error opening action file '%s': %lld", file, h);
LOG(ERROR, "Error opening action file '%s': %lld", file.c_str(), h);
throw PSERROR_GUI_JSOpenFailed();
}
@ -1276,7 +1276,7 @@ void CGUI::Xeromyces_ReadObject(XMBElement Element, CXeromyces* pFile, IGUIObjec
int err = vfs_map(h, 0, data, len);
if (err)
{
LOG(ERROR, "Error mapping action file '%s': %lld", file, err);
LOG(ERROR, "Error mapping action file '%s': %lld", file.c_str(), err);
throw PSERROR_GUI_JSOpenFailed();
}
@ -1353,7 +1353,7 @@ void CGUI::Xeromyces_ReadScript(XMBElement Element, CXeromyces* pFile)
Handle h = vfs_open(file);
if (h <= 0)
{
LOG(ERROR, "Error opening script file '%s': %lld", file, h);
LOG(ERROR, "Error opening script file '%s': %lld", file.c_str(), h);
throw PSERROR_GUI_JSOpenFailed();
}
@ -1362,7 +1362,7 @@ void CGUI::Xeromyces_ReadScript(XMBElement Element, CXeromyces* pFile)
int err = vfs_map(h, 0, data, len);
if (err)
{
LOG(ERROR, "Error mapping script file '%s': %lld", file, err);
LOG(ERROR, "Error mapping script file '%s': %lld", file.c_str(), err);
throw PSERROR_GUI_JSOpenFailed();
}

View File

@ -1,5 +1,8 @@
#include "precompiled.h"
#include <string.h>
#ifdef _WIN32
// From win.cpp (so we don't need all the Windows headers in here)
@ -146,4 +149,4 @@ void cursor_draw(const char* name)
last_cursor = cursor;
}
#endif // #ifdef _WIN32 / #else
#endif // #ifdef _WIN32 / #else

View File

@ -170,11 +170,14 @@ public:
inline CLocker()
{}
/*
GCC doesn't take these... I don't understand what the problem is! // Simon
inline CLocker(const _T &arg): _T(arg)
{}
inline CLocker(_T &arg): _T(arg)
{}
{}*/
};
#endif