Fix build for wxWidgets version 2.8.10 and older.

This was SVN commit r15383.
This commit is contained in:
sanderd17 2014-06-17 19:32:33 +00:00
parent 94b49a01a9
commit f1379a77b5

View File

@ -26,6 +26,7 @@
#include <wx/clipbrd.h>
#include <wx/xml/xml.h>
#include <wx/sstream.h>
#include <wx/version.h>
using AtlasMessage::Position;
@ -122,8 +123,13 @@ public:
else if (xmlData->GetName() == wxT("Position"))
{
wxString x, z;
#if wxCHECK_VERSION(3, 0, 0)
xmlData->GetAttribute(wxT("x"), &x);
xmlData->GetAttribute(wxT("z"), &z);
#else
xmlData->GetPropVal(wxT("x"), &x);
xmlData->GetPropVal(wxT("z"), &z);
#endif
double aux, aux2;
x.ToDouble(&aux);
@ -134,7 +140,11 @@ public:
else if (xmlData->GetName() == wxT("Orientation"))
{
wxString y;
#if wxCHECK_VERSION(3, 0, 0)
xmlData->GetAttribute(wxT("y"), &y);
#else
xmlData->GetPropVal(wxT("y"), &y);
#endif
y.ToDouble(&orientation);
}
else if (xmlData->GetName() == wxT("Player"))