optimize generated binary size

This commit is contained in:
Jinhao
2016-02-19 00:49:32 +08:00
parent d3120cbf35
commit a839cf8deb
11 changed files with 68 additions and 85 deletions

View File

@@ -13,7 +13,6 @@
#include <nana/gui/widgets/textbox.hpp>
#include <nana/gui/widgets/skeletons/text_editor.hpp>
#include <stdexcept>
#include <sstream>
namespace nana
{
@@ -495,11 +494,7 @@ namespace drawerbase {
auto s = _m_caption();
if (s.empty()) return 0;
std::stringstream ss;
int value;
ss << to_utf8(s);
ss >> value;
return value;
return std::stoi(s, nullptr, 0);
}
double textbox::to_double() const
@@ -507,11 +502,7 @@ namespace drawerbase {
auto s = _m_caption();
if (s.empty()) return 0;
std::stringstream ss;
double value;
ss << to_utf8(s);
ss >> value;
return value;
return std::stod(s);
}
textbox& textbox::from(int n)