help the overload not choose itself for trim_zeroes

This commit is contained in:
Joseph Lenox 2018-07-22 21:55:00 -05:00
parent 383ed3e995
commit 97522955a9
3 changed files with 7 additions and 1 deletions

View File

@ -1,4 +1,5 @@
#include "misc_ui.hpp"
#include "utils.hpp"
#include <wx/stdpaths.h>
#include <wx/msgdlg.h>
#include <wx/arrstr.h>
@ -150,7 +151,8 @@ std::vector<wxString> open_model(wxWindow* parent, wxWindow* top) {
wxString trim_zeroes(wxString in) { return wxString(trim_zeroes(in.ToStdString())); }
wxString trim_zeroes(wxString in) { return wxString(_trim_zeroes(in.ToStdString())); }
}} // namespace Slic3r::GUI

View File

@ -50,6 +50,8 @@ split_at_regex(const std::string& input, const std::string& regex) {
last;
return {first, last};
}
std::string _trim_zeroes(std::string in) { return trim_zeroes(in); }
/// Remove extra zeroes generated from std::to_string on doubles
std::string trim_zeroes(std::string in) {
std::string result {""};

View File

@ -9,6 +9,8 @@
/// Separate a string based on some regular expression string.
std::vector<std::string>
split_at_regex(const std::string& input, const std::string& regex);
std::string trim_zeroes(std::string in);
std::string _trim_zeroes(std::string in);
#endif // UTILS_HPP