aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2018-03-23 22:12:42 +0100
committerLoic Blot <loic.blot@unix-experience.fr>2018-03-23 22:12:48 +0100
commiteab652fd52b7b806b9414a26a0bf5348df4282f6 (patch)
tree38395781f2e1dffd100ac971843b52556fa0ee94 /src
parent9293d8e2715f3e883fee4c0ed617636a785f20d1 (diff)
Fix some gcc 7.3 reported warnings
``` src/client/joystick_controller.h:85:2: warning: duplicate 'virtual' declaration specifier [-Wduplicate-decl-specifier] virtual bool isTriggered(const irr::SEvent::SJoystickEvent &ev) const; /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.3.1/../../../../include/c++/7.3.1/ext/new_allocator.h:140:22: warning: destructor called on non-final 'JoystickAxisCmb' that has virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor] destroy(_Up* __p) { __p->~_Up(); } /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.3.1/../../../../include/c++/7.3.1/ext/new_allocator.h:140:22: warning: destructor called on non-final 'JoystickButtonCmb' that has virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor] destroy(_Up* __p) { __p->~_Up(); } ```
Diffstat (limited to 'src')
-rw-r--r--src/client/joystick_controller.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/joystick_controller.h b/src/client/joystick_controller.h
index 6bea282ee..7baacd81b 100644
--- a/src/client/joystick_controller.h
+++ b/src/client/joystick_controller.h
@@ -60,6 +60,8 @@ struct JoystickButtonCmb : public JoystickCombination {
this->key = key;
}
+ virtual ~JoystickButtonCmb() = default;
+
virtual bool isTriggered(const irr::SEvent::SJoystickEvent &ev) const;
u32 filter_mask;
@@ -78,7 +80,9 @@ struct JoystickAxisCmb : public JoystickCombination {
this->key = key;
}
- virtual bool isTriggered(const irr::SEvent::SJoystickEvent &ev) const;
+ virtual ~JoystickAxisCmb() = default;
+
+ bool isTriggered(const irr::SEvent::SJoystickEvent &ev) const override;
u16 axis_to_compare;
TY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #pragma once #include "mapgen.h" ////////////// Mapgen Valleys flags #define MGVALLEYS_ALT_CHILL 0x01 #define MGVALLEYS_HUMID_RIVERS 0x02 // Feed only one variable into these. #define MYSQUARE(x) (x) * (x) #define MYCUBE(x) (x) * (x) * (x) class BiomeManager; class BiomeGenOriginal; // Global profiler //class Profiler; //extern Profiler *mapgen_profiler; struct MapgenValleysParams : public MapgenParams { u32 spflags = MGVALLEYS_HUMID_RIVERS | MGVALLEYS_ALT_CHILL; s16 large_cave_depth = -33; s16 massive_cave_depth = -256; // highest altitude of massive caves u16 altitude_chill = 90; // The altitude at which temperature drops by 20C. u16 lava_features = 0; // How often water will occur in caves. u16 river_depth = 4; // How deep to carve river channels. u16 river_size = 5; // How wide to make rivers. u16 water_features = 0; // How often water will occur in caves. float cave_width = 0.09f; NoiseParams np_cave1; NoiseParams np_cave2; NoiseParams np_filler_depth; NoiseParams np_inter_valley_fill; NoiseParams np_inter_valley_slope; NoiseParams np_rivers; NoiseParams np_massive_caves; NoiseParams np_terrain_height; NoiseParams np_valley_depth; NoiseParams np_valley_profile; MapgenValleysParams(); ~MapgenValleysParams() = default; void readParams(const Settings *settings); void writeParams(Settings *settings) const; }; struct TerrainNoise { s16 x; s16 z;