Kill AegiFloatToString and AegiIntegerToString

This commit is contained in:
Thomas Goyne 2013-06-06 20:15:53 -07:00
parent ed7151a7a5
commit 151b1cb6ac
3 changed files with 2 additions and 12 deletions

View file

@ -132,7 +132,7 @@ static void add_with_label(wxSizer *sizer, wxWindow *parent, wxString const& lab
}
static wxSpinCtrl *spin_ctrl(wxWindow *parent, float value, int max_value) {
return new wxSpinCtrl(parent, -1, AegiFloatToString(value), wxDefaultPosition, wxSize(60, -1), wxSP_ARROW_KEYS, 0, max_value, value);
return new wxSpinCtrl(parent, -1, wxString::Format("%g", value), wxDefaultPosition, wxSize(60, -1), wxSP_ARROW_KEYS, 0, max_value, value);
}
static wxTextCtrl *num_text_ctrl(wxWindow *parent, double value, bool allow_negative, wxSize size = wxSize(70, 20)) {
@ -161,7 +161,7 @@ DialogStyleEditor::DialogStyleEditor(wxWindow *parent, AssStyle *style, agi::Con
SetIcon(GETICON(style_toolbutton_16));
// Prepare control values
wxString EncodingValue = AegiIntegerToString(style->encoding);
wxString EncodingValue = std::to_wstring(style->encoding);
wxString alignValues[9] = { "7", "8", "9", "4", "5", "6", "1", "2", "3" };
wxArrayString fontList = wxFontEnumerator::GetFacenames();
fontList.Sort();

View file

@ -65,14 +65,6 @@
#include <libaegisub/util_osx.h>
#endif
wxString AegiFloatToString(double value) {
return wxString::Format("%g",value);
}
wxString AegiIntegerToString(int value) {
return wxString::Format("%i",value);
}
/// @brief There shall be no kiB, MiB stuff here Pretty reading of size
wxString PrettySize(int bytes) {
const char *suffix[] = { "", "kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB" };

View file

@ -50,8 +50,6 @@
class wxMouseEvent;
class wxWindow;
wxString AegiFloatToString(double value);
wxString AegiIntegerToString(int value);
wxString PrettySize(int bytes);
void StatusTimeout(wxString const& msg, int ms = 10000);