Core/String: Replace implicit operator std::string by ToStd::String

This commit is contained in:
Lynix
2017-12-14 19:50:06 +01:00
parent 5aab9b248d
commit fd8306f17f
13 changed files with 40 additions and 43 deletions

View File

@@ -168,6 +168,7 @@ namespace Nz
bool ToDouble(double* value) const;
bool ToInteger(long long* value, UInt8 radix = 10) const;
String ToLower(UInt32 flags = None) const;
std::string ToStdString() const;
String ToUpper(UInt32 flags = None) const;
String& Trim(UInt32 flags = None);
@@ -193,8 +194,6 @@ namespace Nz
typedef char value_type;
// Méthodes STD
operator std::string() const;
char& operator[](std::size_t pos);
char operator[](std::size_t pos) const;

View File

@@ -238,7 +238,7 @@ namespace Nz
String error("Column out of range: (" + String::Number(column) + ") > 3");
NazaraError(error);
throw std::out_of_range(error);
throw std::out_of_range(error.ToStdString());
}
#endif
@@ -632,7 +632,7 @@ namespace Nz
String error("Row out of range: (" + String::Number(row) + ") > 3");
NazaraError(error);
throw std::out_of_range(error);
throw std::out_of_range(error.ToStdString());
}
#endif
@@ -1347,7 +1347,7 @@ namespace Nz
String error("Index out of range: (" + String::Number(x) + ", " + String::Number(y) +") > (3, 3)");
NazaraError(error);
throw std::out_of_range(error);
throw std::out_of_range(error.ToStdString());
}
#endif
@@ -1371,7 +1371,7 @@ namespace Nz
String error("Index out of range: (" + String::Number(x) + ", " + String::Number(y) +") > (3, 3)");
NazaraError(error);
throw std::out_of_range(error);
throw std::out_of_range(error.ToStdString());
}
#endif

View File

@@ -304,7 +304,7 @@ namespace Nz
ss << "Index out of range: (" << i << " >= " << BoxCorner_Max << ")";
NazaraError(ss);
throw std::out_of_range(ss.ToString());
throw std::out_of_range(ss.ToString().ToStdString());
}
#endif

View File

@@ -579,7 +579,7 @@ namespace Nz
String error("Planes are parallel");
NazaraError(error);
throw std::domain_error(error);
throw std::domain_error(error.ToStdString());
}
#endif

View File

@@ -607,7 +607,7 @@ namespace Nz
String error("Division by zero");
NazaraError(error);
throw std::domain_error(error);
throw std::domain_error(error.ToStdString());
}
#endif
@@ -633,7 +633,7 @@ namespace Nz
String error("Division by zero");
NazaraError(error);
throw std::domain_error(error);
throw std::domain_error(error.ToStdString());
}
#endif
@@ -723,7 +723,7 @@ namespace Nz
String error("Division by zero");
NazaraError(error);
throw std::domain_error(error);
throw std::domain_error(error.ToStdString());
}
#endif
@@ -752,7 +752,7 @@ namespace Nz
String error("Division by zero");
NazaraError(error);
throw std::domain_error(error);
throw std::domain_error(error.ToStdString());
}
#endif
@@ -1050,7 +1050,7 @@ Nz::Vector2<T> operator/(T scale, const Nz::Vector2<T>& vec)
Nz::String error("Division by zero");
NazaraError(error);
throw std::domain_error(error);
throw std::domain_error(error.ToStdString());
}
#endif

View File

@@ -142,7 +142,7 @@ namespace Nz
String error("Division by zero");
NazaraError(error);
throw std::domain_error(error);
throw std::domain_error(error.ToStdString());
}
#endif
@@ -726,7 +726,7 @@ namespace Nz
String error("Division by zero");
NazaraError(error);
throw std::domain_error(error);
throw std::domain_error(error.ToStdString());
}
#endif
@@ -751,7 +751,7 @@ namespace Nz
String error("Division by zero");
NazaraError(error);
throw std::domain_error(error);
throw std::domain_error(error.ToStdString());
}
#endif
@@ -839,7 +839,7 @@ namespace Nz
String error("Division by zero");
NazaraError(error);
throw std::domain_error(error);
throw std::domain_error(error.ToStdString());
}
x /= vec.x;
@@ -866,7 +866,7 @@ namespace Nz
String error("Division by zero");
NazaraError(error);
throw std::domain_error(error);
throw std::domain_error(error.ToStdString());
}
x /= scale;
@@ -1340,7 +1340,7 @@ Nz::Vector3<T> operator/(T scale, const Nz::Vector3<T>& vec)
Nz::String error("Division by zero");
NazaraError(error);
throw std::domain_error(error);
throw std::domain_error(error.ToStdString());
}
#endif

View File

@@ -637,7 +637,7 @@ namespace Nz
String error("Division by zero");
NazaraError(error);
throw std::domain_error(error);
throw std::domain_error(error.ToStdString());
}
#endif
@@ -663,7 +663,7 @@ namespace Nz
String error("Division by zero");
NazaraError(error);
throw std::domain_error(error);
throw std::domain_error(error.ToStdString());
}
#endif
@@ -761,7 +761,7 @@ namespace Nz
String error("Division by zero");
NazaraError(error);
throw std::domain_error(error);
throw std::domain_error(error.ToStdString());
}
#endif
@@ -792,7 +792,7 @@ namespace Nz
String error("Division by zero");
NazaraError(error);
throw std::domain_error(error);
throw std::domain_error(error.ToStdString());
}
#endif
@@ -1113,7 +1113,7 @@ Nz::Vector4<T> operator/(T scale, const Nz::Vector4<T>& vec)
Nz::String error("Division by zero");
NazaraError(error);
throw std::domain_error(error);
throw std::domain_error(error.ToStdString());
}
#endif