aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt6
-rw-r--r--src/debug.h2
-rw-r--r--src/guiKeyChangeMenu.h28
-rw-r--r--src/inventory.h2
-rw-r--r--src/main.cpp3
-rw-r--r--src/player.h4
-rw-r--r--src/utility.h2
-rw-r--r--src/voxel.h2
8 files changed, 25 insertions, 24 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 7046857e6..0fceb85e7 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -209,7 +209,7 @@ endif(BUILD_SERVER)
# Set some optimizations and tweaks
#
-include(CheckCCompilerFlag)
+include(CheckCXXCompilerFlag)
if(MSVC)
# Visual Studio
@@ -237,8 +237,8 @@ else()
set(RELEASE_WARNING_FLAGS "")
endif()
- if(NOT APPLE)
- check_c_compiler_flag("-Wno-unused-but-set-variable" HAS_UNUSED_BUT_SET_VARIABLE_WARNING)
+ if(NOT APPLE AND NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+ CHECK_CXX_COMPILER_FLAG("-Wno-unused-but-set-variable" HAS_UNUSED_BUT_SET_VARIABLE_WARNING)
if(HAS_UNUSED_BUT_SET_VARIABLE_WARNING)
set(WARNING_FLAGS "${WARNING_FLAGS} -Wno-unused-but-set-variable")
endif(HAS_UNUSED_BUT_SET_VARIABLE_WARNING)
diff --git a/src/debug.h b/src/debug.h
index 234b7c74a..f3cfe88b3 100644
--- a/src/debug.h
+++ b/src/debug.h
@@ -85,7 +85,7 @@ public:
return c;
}
- int xsputn(const char *s, int n)
+ std::streamsize xsputn(const char *s, std::streamsize n)
{
for(int i=0; i<DEBUGSTREAM_COUNT; i++)
{
diff --git a/src/guiKeyChangeMenu.h b/src/guiKeyChangeMenu.h
index db86ab2d1..dcca6b0b6 100644
--- a/src/guiKeyChangeMenu.h
+++ b/src/guiKeyChangeMenu.h
@@ -114,20 +114,20 @@ private:
gui::IGUIButton *dump;
gui::IGUIButton *chat;
- u32 activeKey;
- u32 key_forward;
- u32 key_backward;
- u32 key_left;
- u32 key_right;
- u32 key_use;
- u32 key_sneak;
- u32 key_jump;
- u32 key_inventory;
- u32 key_fly;
- u32 key_fast;
- u32 key_range;
- u32 key_chat;
- u32 key_dump;
+ s32 activeKey;
+ s32 key_forward;
+ s32 key_backward;
+ s32 key_left;
+ s32 key_right;
+ s32 key_use;
+ s32 key_sneak;
+ s32 key_jump;
+ s32 key_inventory;
+ s32 key_fly;
+ s32 key_fast;
+ s32 key_range;
+ s32 key_chat;
+ s32 key_dump;
};
#endif
diff --git a/src/inventory.h b/src/inventory.h
index 53495c6e5..9d6020a8d 100644
--- a/src/inventory.h
+++ b/src/inventory.h
@@ -558,7 +558,7 @@ struct InventoryContext
{}
};
-class InventoryAction;
+struct InventoryAction;
class InventoryManager
{
diff --git a/src/main.cpp b/src/main.cpp
index 4f57fc078..d93cdba1e 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1378,9 +1378,6 @@ int main(int argc, char *argv[])
if (device == 0)
return 1; // could not create selected driver.
- // Set device in game parameters
- device = device;
-
// Set the window caption
device->setWindowCaption(L"Minetest [Main Menu]");
diff --git a/src/player.h b/src/player.h
index 78ca14948..b91c3cb1b 100644
--- a/src/player.h
+++ b/src/player.h
@@ -62,7 +62,7 @@ public:
return m_position;
}
- virtual void setPosition(v3f position)
+ virtual void setPosition(const v3f &position)
{
m_position = position;
}
@@ -206,7 +206,7 @@ public:
return m_box;
}
- void setPosition(v3f position)
+ void setPosition(const v3f &position)
{
m_oldpos = m_showpos;
diff --git a/src/utility.h b/src/utility.h
index 497f79fa0..df151fd87 100644
--- a/src/utility.h
+++ b/src/utility.h
@@ -1456,6 +1456,8 @@ public:
i.getNode()->getValue());
}
+ return *this;
+
}
Settings & operator=(Settings &other)
diff --git a/src/voxel.h b/src/voxel.h
index 6d1a318f1..51df18299 100644
--- a/src/voxel.h
+++ b/src/voxel.h
@@ -453,12 +453,14 @@ public:
if(m_area.contains(p) == false)
return false;
m_data[m_area.index(p)] = n;
+ return true;
}
bool setNodeNoEmerge(s32 i, MapNode n)
{
if(m_area.contains(i) == false)
return false;
m_data[i] = n;
+ return true;
}
/*bool setContentNoEmerge(v3s16 p, u8 c)
{