Fixes to compile with clang
This commit is contained in:
parent
4751941e4f
commit
8d6ccb8d83
|
@ -16,6 +16,7 @@ limitZoom = false
|
|||
currentViewMode = 0
|
||||
smartWalkDirs = {}
|
||||
smartWalkDir = nil
|
||||
walkFunction = g_game.walk
|
||||
|
||||
function init()
|
||||
g_ui.importStyle('styles/countwindow')
|
||||
|
@ -262,9 +263,9 @@ end
|
|||
function smartWalk(dir)
|
||||
if g_keyboard.getModifiers() == KeyboardNoModifier then
|
||||
if smartWalkDir then
|
||||
g_game.walk(smartWalkDir)
|
||||
walkFunction(smartWalkDir)
|
||||
else
|
||||
g_game.walk(dir)
|
||||
walkFunction(dir)
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
|
|
@ -51,7 +51,6 @@ private:
|
|||
|
||||
TexturePtr m_lightTexture;
|
||||
FrameBufferPtr m_lightbuffer;
|
||||
MapView* m_mapView;
|
||||
Light m_globalLight;
|
||||
std::vector<LightSource> m_lightMap;
|
||||
};
|
||||
|
|
|
@ -95,7 +95,6 @@ void Map::loadOtbm(const std::string& fileName, const UIWidgetPtr& pbar)
|
|||
uint8 mapDataType = nodeMapData->getU8();
|
||||
if(mapDataType == OTBM_TILE_AREA) {
|
||||
Position basePos = nodeMapData->getPosition();
|
||||
unsigned int pbarvalue=0;
|
||||
|
||||
for(const BinaryTreePtr &nodeTile : nodeMapData->getChildren()) {
|
||||
uint8 type = nodeTile->getU8();
|
||||
|
|
|
@ -92,8 +92,6 @@ void MapView::draw(const Rect& rect)
|
|||
else
|
||||
drawFlags = Otc::DrawGround | Otc::DrawGroundBorders | Otc::DrawWalls | Otc::DrawItems;
|
||||
|
||||
Size tileSize = Size(1,1) * m_tileSize;
|
||||
|
||||
if(m_mustDrawVisibleTilesCache || (drawFlags & Otc::DrawAnimations)) {
|
||||
m_framebuffer->bind();
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue