Browse Source

Fix unit test crash when running in debug mode.

Michael Ragazzon 5 years ago
parent
commit
3a96cba713
2 changed files with 1 additions and 3 deletions
  1. 1 1
      Include/RmlUi/Core/StringUtilities.h
  2. 0 2
      Source/Core/StringUtilities.cpp

+ 1 - 1
Include/RmlUi/Core/StringUtilities.h

@@ -96,7 +96,7 @@ namespace StringUtilities
 	RMLUICORE_API String StripWhitespace(StringView string);
 
 	/// Trim trailing zeros and the dot from a string-representation of a number with a decimal point.
-	/// @warning If the string does not represent a number _with_ a decimal point, the result will probably not be as desired.
+	/// @warning If the string does not represent a number _with_ a decimal point, the result is ill-defined.
 	RMLUICORE_API void TrimTrailingDotZeros(String& string);
 
 	/// Case insensitive string comparison. Returns true if they compare equal.

+ 0 - 2
Source/Core/StringUtilities.cpp

@@ -282,8 +282,6 @@ RMLUICORE_API String StringUtilities::StripWhitespace(StringView string)
 
 void StringUtilities::TrimTrailingDotZeros(String& string)
 {
-	RMLUI_ASSERTMSG(string.find('.') != String::npos, "This function probably does not do what you want if the string is not a number with a decimal point.");
-
 	size_t new_size = string.size();
 	for (size_t i = string.size() - 1; i < string.size(); i--)
 	{