Browse Source

Fix additional compiler warnings.

Michael Ragazzon 6 years ago
parent
commit
c70d5cca3d

+ 2 - 0
Include/RmlUi/Core/PropertySpecification.h

@@ -63,11 +63,13 @@ public:
 		name_map[(size_t)id] = name;
 		bool inserted = reverse_map.emplace(name, id).second;
 		RMLUI_ASSERT(inserted);
+		(void)inserted;
 	}
 
 	void AssertAllInserted(ID last_property_inserted) const {
 		ptrdiff_t cnt = std::count_if(name_map.begin(), name_map.end(), [](const String& name) { return !name.empty(); });
 		RMLUI_ASSERT(cnt == (ptrdiff_t)last_property_inserted && reverse_map.size() == (size_t)last_property_inserted);
+		(void)cnt;
 	}
 
 	ID GetId(const String& name) const

+ 4 - 0
Samples/basic/sfml2/src/SystemInterfaceSFML.cpp

@@ -300,6 +300,8 @@ Rml::Core::Input::KeyIdentifier RmlUiSFMLSystemInterface::TranslateKey(sf::Keybo
 	case sf::Keyboard::Tab:
 		return Rml::Core::Input::KI_TAB;
 		break;
+	default:
+		break;
 	};
 
 	return Rml::Core::Input::KI_UNKNOWN;
@@ -334,6 +336,8 @@ bool RmlUiSFMLSystemInterface::LogMessage(Rml::Core::Log::Type type, const Rml::
 	case Rml::Core::Log::LT_DEBUG:
 		Type = "[Debug]";
 		break;
+	default:
+		break;
 	};
 
 	printf("%s - %s\n", Type.c_str(), message.c_str());

+ 2 - 1
Source/Core/BitmapFont/FontFaceHandle.h

@@ -79,7 +79,8 @@ private:
 
 	void BuildGlyphMap(BitmapFontDefinitions *bm_face, const UnicodeRange& unicode_range);
 	void BuildGlyph(FontGlyph& glyph, CharacterInfo *ft_glyph);
-	int GetKerning(word lhs, word rhs) const;
+
+	int GetKerning(word lhs, word rhs) const override;
 
 	BitmapFontDefinitions * bm_face;
 	String texture_source;

+ 1 - 1
Source/Core/ElementAnimation.cpp

@@ -348,7 +348,7 @@ static bool PrepareTransforms(std::vector<AnimationKey>& keys, Element& element,
 
 
 ElementAnimation::ElementAnimation(PropertyId property_id, ElementAnimationOrigin origin, const Property& current_value, double start_world_time, float duration, int num_iterations, bool alternate_direction)
-	: property_id(property_id), origin(origin), duration(duration), num_iterations(num_iterations), alternate_direction(alternate_direction),
+	: property_id(property_id), duration(duration), origin(origin), num_iterations(num_iterations), alternate_direction(alternate_direction),
 	last_update_world_time(start_world_time), time_since_iteration_start(0.0f), current_iteration(0), reverse_direction(false), animation_complete(false)
 {
 	if (!current_value.definition)

+ 1 - 1
Source/Core/PropertyParserKeyword.h

@@ -54,7 +54,7 @@ public:
 	bool ParseValue(Property& property, const String& value, const ParameterMap& parameters) const override;
 
 	// Destroys the parser.
-	void Release();
+	void Release() override;
 };
 
 }

+ 1 - 1
Source/Core/PropertyParserNumber.h

@@ -54,7 +54,7 @@ public:
 	bool ParseValue(Property& property, const String& value, const ParameterMap& parameters) const override;
 
 	// Destroys the parser.
-	void Release();
+	void Release() override;
 
 private:
 	// Stores a bit mask of allowed units.

+ 1 - 1
Source/Core/PropertyParserString.h

@@ -54,7 +54,7 @@ public:
 	bool ParseValue(Property& property, const String& value, const ParameterMap& parameters) const override;
 
 	// Destroys the parser.
-	void Release();
+	void Release() override;
 };
 
 }

+ 1 - 1
Source/Core/PropertyParserTransform.h

@@ -57,7 +57,7 @@ public:
 	bool ParseValue(Property& property, const String& value, const ParameterMap& parameters) const override;
 
 	// Destroys the parser.
-	void Release();
+	void Release() override;
 
 private:
 	/// Scan a string for a parameterized keyword with a certain number of numeric arguments.