fix compiling on gcc 4.6 (too early to use 4.7.1...)

master
niczkx 12 years ago
parent 39db801f93
commit 4c369bc823

@ -68,8 +68,8 @@ protected:
std::string m_appCompactName;
std::string m_appVersion;
std::string m_startupOptions;
bool m_running = false;
bool m_stopping = false;
stdext::boolean<false> m_running;
stdext::boolean<false> m_stopping;
stdext::boolean<false> m_terminated;
};

@ -40,7 +40,7 @@ public:
private:
std::list<EventPtr> m_eventList;
int m_pollEventsSize;
bool m_disabled = false;
stdext::boolean<false> m_disabled;
std::priority_queue<ScheduledEventPtr, std::vector<ScheduledEventPtr>, lessScheduledEvent> m_scheduledEventList;
};

@ -60,8 +60,8 @@ protected:
void inputEvent(const InputEvent& event);
private:
bool m_onInputEvent = false;
bool m_mustRepaint = false;
stdext::boolean<false> m_onInputEvent;
stdext::boolean<false> m_mustRepaint;
AdaptativeFrameCounter m_backgroundFrameCounter;
AdaptativeFrameCounter m_foregroundFrameCounter;
TexturePtr m_foreground;

@ -63,10 +63,10 @@ protected:
friend class ModuleManager;
private:
bool m_loaded = false;
bool m_autoLoad = false;
bool m_reloadable = false;
bool m_sandboxed = false;
stdext::boolean<false> m_loaded;
stdext::boolean<false> m_autoLoad;
stdext::boolean<false> m_reloadable;
stdext::boolean<false> m_sandboxed;
int m_autoLoadPriority;
int m_sandboxEnv;
std::tuple<std::string, std::string> m_onLoadFunc;

@ -72,7 +72,7 @@ public:
private:
std::string m_workDir;
std::string m_writeDir;
bool m_hasSearchPath = false;
stdext::boolean<false> m_hasSearchPath;
std::deque<std::string> m_searchPaths;
};

@ -41,7 +41,7 @@ public:
private:
ticks_t m_startTicks;
bool m_stopped = false;
stdext::boolean<false> m_stopped;
};
#endif

@ -48,7 +48,7 @@ private:
std::string m_text;
Size m_textSize;
bool m_textMustRecache = true;
stdext::boolean<true> m_textMustRecache;
CoordsBuffer m_textCoordsBuffer;
Rect m_textCachedScreenCoords;
BitmapFontPtr m_font;

@ -61,8 +61,8 @@ private:
Size m_oldViewportSize;
uint m_fbo;
uint m_prevBoundFbo;
bool m_backuping = true;
bool m_smooth = true;
stdext::boolean<true> m_backuping;
stdext::boolean<true> m_smooth;
static uint boundFbo;
};

@ -77,16 +77,16 @@ private:
int m_maxTextureSize;
int m_alphaBits;
bool m_ok = false;
bool m_useDrawArrays = true;
bool m_useFBO = true;
bool m_useHardwareBuffers = false;
bool m_useBilinearFiltering = true;
bool m_useNonPowerOfTwoTextures = true;
bool m_useMipmaps = true;
bool m_useHardwareMipmaps = true;
bool m_useClampToEdge = true;
bool m_cacheBackbuffer = true;
stdext::boolean<false> m_ok;
stdext::boolean<true> m_useDrawArrays;
stdext::boolean<true> m_useFBO;
stdext::boolean<false> m_useHardwareBuffers;
stdext::boolean<true> m_useBilinearFiltering;
stdext::boolean<true> m_useNonPowerOfTwoTextures;
stdext::boolean<true> m_useMipmaps;
stdext::boolean<true> m_useHardwareMipmaps;
stdext::boolean<true> m_useClampToEdge;
stdext::boolean<true> m_cacheBackbuffer;
PainterEngine m_prefferedPainterEngine;
PainterEngine m_selectedPainterEngine;
};

@ -72,7 +72,7 @@ private:
void updateGlTextureState();
GLenum m_matrixMode;
bool m_textureEnabled = false;
stdext::boolean<false> m_textureEnabled;
};
extern PainterOGL1 *g_painterOGL1;

@ -63,10 +63,10 @@ protected:
Size m_size;
Size m_glSize;
Matrix3 m_transformMatrix;
bool m_hasMipmaps = false;
bool m_smooth = false;
bool m_upsideDown = false;
bool m_repeat = false;
stdext::boolean<false> m_hasMipmaps;
stdext::boolean<false> m_smooth;
stdext::boolean<false> m_upsideDown;
stdext::boolean<false> m_repeat;
};
#endif

@ -111,11 +111,11 @@ protected:
InputEvent m_inputEvent;
stdext::boolean<false> m_mouseButtonStates[4];
bool m_created = false;
bool m_visible = false;
bool m_focused = false;
bool m_fullscreen = false;
bool m_maximized = false;
stdext::boolean<false> m_created;
stdext::boolean<false> m_visible;
stdext::boolean<false> m_focused;
stdext::boolean<false> m_fullscreen;
stdext::boolean<false> m_maximized;
std::function<void()> m_onClose;
OnResizeCallback m_onResize;

@ -61,8 +61,8 @@ private:
SoundSourcePtr m_musicSource;
ALCdevice *m_device;
ALCcontext *m_context;
bool m_musicEnabled = false;
bool m_soundEnabled = false;
stdext::boolean<false> m_musicEnabled;
stdext::boolean<false> m_soundEnabled;
std::string m_currentMusic;
};

@ -56,7 +56,7 @@ private:
SoundFilePtr m_soundFile;
std::array<SoundBufferPtr,STREAM_FRAGMENTS> m_buffers;
DownMix m_downMix;
bool m_looping = false;
stdext::boolean<false> m_looping;
};
#endif

@ -34,6 +34,7 @@
namespace stdext {
class attrib_storage {
public:
attrib_storage() : m_attribs(nullptr), m_size(0) { }
~attrib_storage() { if(m_attribs) delete[] m_attribs; }
template<typename T>
@ -74,8 +75,8 @@ public:
}
private:
std::tuple<uint8, boost::any>* m_attribs = nullptr;
uint8 m_size = 0;
std::tuple<uint8, boost::any>* m_attribs;
uint8 m_size;
};
// restore memory alignment

@ -27,8 +27,8 @@
// clang is supported
#undef _GLIBCXX_USE_FLOAT128
#elif defined(__GNUC__)
#if !(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7))
#error "Sorry, you need gcc 4.7 or greater to compile."
#if !(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
#error "Sorry, you need gcc 4.6 or greater to compile."
#endif
#else
#error "Compiler not supported."

@ -41,7 +41,7 @@ public:
bool isUIBoxLayout() { return true; }
protected:
bool m_fitChildren = false;
stdext::boolean<false> m_fitChildren;
int m_spacing;
};

@ -55,9 +55,9 @@ private:
int m_cellSpacing;
int m_numColumns;
int m_numLines;
bool m_autoSpacing = false;
bool m_fitChildren = false;
bool m_flow = false;
stdext::boolean<false> m_autoSpacing;
stdext::boolean<false> m_fitChildren;
stdext::boolean<false> m_flow;
};
#endif

@ -39,7 +39,7 @@ public:
protected:
bool internalUpdate();
bool m_alignRight = false;
stdext::boolean<false> m_alignRight;
};
#endif

@ -58,8 +58,8 @@ protected:
virtual bool internalUpdate() = 0;
int m_updateDisabled;
bool m_updating = false;
bool m_updateScheduled = false;
stdext::boolean<false> m_updating;
stdext::boolean<false> m_updateScheduled;
UIWidgetPtr m_parentWidget;
};

@ -82,8 +82,8 @@ private:
UIWidgetPtr m_draggingWidget;
UIWidgetPtr m_hoveredWidget;
UIWidgetPtr m_pressedWidget;
bool m_hoverUpdateScheduled = false;
bool m_drawDebugBoxes = false;
stdext::boolean<false> m_hoverUpdateScheduled;
stdext::boolean<false> m_drawDebugBoxes;
std::unordered_map<std::string, OTMLNodePtr> m_styles;
UIWidgetList m_destroyedWidgets;
ScheduledEventPtr m_checkEvent;

@ -98,6 +98,7 @@ bool Creatures::m_loadCreatureBuffer(TiXmlElement* attrib, const CreatureTypePtr
return true;
Outfit out;
out.setCategory(ThingCategoryCreature);
int32 type;
if(!attrib->Attribute("type").empty())
type = attrib->readType<int32>("type");

@ -122,7 +122,7 @@ void Map::loadOtbm(const std::string& fileName)
setHouseFile(fileName.substr(0, fileName.rfind('/') + 1) + tmp);
break;
default:
stdext::throw_exception(stdext::format("Invalid attribute '%c'", attribute));
stdext::throw_exception(stdext::format("Invalid attribute '%d'", (int)attribute));
}
}

@ -129,7 +129,6 @@ enum clientVersion_t
CLIENT_VERSION_960 = 40
};
enum {
OTCM_SIGNATURE = 0x4D43544F,
OTCM_VERSION = 1

Loading…
Cancel
Save