mirror of
https://github.com/edubart/otclient.git
synced 2025-10-17 13:03:27 +02:00
Fixes to compile with clang
This commit is contained in:
@@ -147,7 +147,7 @@ else()
|
||||
endif()
|
||||
|
||||
# gcc compile flags
|
||||
set(WARNS_FLAGS "-Wall -Wextra -Werror -Wno-unused-parameter -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unused-result")
|
||||
set(WARNS_FLAGS "-Wall -Wextra -Werror -Wno-unused-parameter -Wno-unused-variable -Wno-unused-result")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNS_FLAGS} ${ARCH_FLAGS} ${CPP2011_FLAGS} -pipe")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O1 -g -fno-omit-frame-pointer")
|
||||
|
@@ -58,7 +58,6 @@ public:
|
||||
private:
|
||||
int m_frames;
|
||||
int m_partialFrames;
|
||||
ticks_t m_partialFpsDelta;
|
||||
float m_partialFps;
|
||||
float m_maxPartialFps;
|
||||
ticks_t m_frameDelaySum;
|
||||
|
@@ -98,6 +98,10 @@ int push_luavalue(const OTMLNodePtr& node);
|
||||
bool luavalue_cast(int index, OTMLNodePtr& node);
|
||||
|
||||
// enum
|
||||
template<class T>
|
||||
typename std::enable_if<std::is_enum<T>::value, int>::type
|
||||
push_luavalue(T e) { return push_luavalue((int)e); }
|
||||
|
||||
template<class T>
|
||||
typename std::enable_if<std::is_enum<T>::value, bool>::type
|
||||
luavalue_cast(int index, T& myenum);
|
||||
|
@@ -44,7 +44,7 @@ public:
|
||||
virtual bool isBuffering();
|
||||
virtual bool isPlaying() { return isBuffering(); }
|
||||
|
||||
void setName(const std::string& name) { m_name == name; }
|
||||
void setName(const std::string& name) { m_name = name; }
|
||||
virtual void setLooping(bool looping);
|
||||
virtual void setRelative(bool relative);
|
||||
virtual void setReferenceDistance(float distance);
|
||||
|
Reference in New Issue
Block a user