Depreciated ToString specialization for wxString

This commit is contained in:
victorlevasseur
2015-06-07 16:48:29 +02:00
parent 57356cbce2
commit 60e47b844d
2 changed files with 10 additions and 2 deletions

View File

@@ -1270,7 +1270,7 @@ void SpriteObjectEditor::OnAddPointClick(wxCommandEvent& event)
if ( sprites.empty() ) return;
//Find a new name for the point
Point point(GD_T("NewPoint")));
Point point(GD_T("NewPoint"));
unsigned int i = 2;
while ( sprites[0]->HasPoint(gd::utf8::FromWxString(point.GetName())) )
{

View File

@@ -14,6 +14,13 @@
#include <vector>
#include "Utf8/utf8.h"
#include <SFML/System/String.hpp>
#ifdef __GNUC__
#define GD_DEPRECATED __attribute__((deprecated))
#else
#define GD_DEPRECATED
#endif
class wxString;
namespace gd
@@ -81,10 +88,11 @@ float ToFloat( const T & value )
/**
* Specialization for converting wxString to a std::string
* \deprecated Use ToLocaleString to convert a wxString to a locale std::string or gd::utf8::FromWxString to convert to an UTF8 std::string instead. If used, this function will produce a warning at runtime as it might cause problems with UTF8 strings.
* \ingroup CommonProgrammingTools
*/
template<>
std::string GD_CORE_API ToString( const wxString & value );
std::string GD_CORE_API ToString( const wxString & value ) GD_DEPRECATED;
/**
* Split a string into tokens stored in a vector, using the specified separator.