diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 16:57:03 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 16:57:03 +0200 |
commit | 420fb6c9b3427f65cfe24411944ee46b58cfcfb4 (patch) | |
tree | 58269ba5ee7a22d2df004f03b100cc234b8c3f14 /library/globalFunctions.cpp | |
parent | 1.16 (diff) | |
download | FreeFileSync-420fb6c9b3427f65cfe24411944ee46b58cfcfb4.tar.gz FreeFileSync-420fb6c9b3427f65cfe24411944ee46b58cfcfb4.tar.bz2 FreeFileSync-420fb6c9b3427f65cfe24411944ee46b58cfcfb4.zip |
1.17
Diffstat (limited to 'library/globalFunctions.cpp')
-rw-r--r-- | library/globalFunctions.cpp | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/library/globalFunctions.cpp b/library/globalFunctions.cpp index aeeeed45..4b387293 100644 --- a/library/globalFunctions.cpp +++ b/library/globalFunctions.cpp @@ -4,13 +4,6 @@ #include <wx/file.h> -inline -int globalFunctions::round(const double d) -{ - return static_cast<int>(d<0?d-.5:d+.5); -} - - std::string globalFunctions::numberToString(const unsigned int number) { char result[100]; @@ -88,11 +81,12 @@ double globalFunctions::wxStringToDouble(const wxString& number) } -wxString& globalFunctions::includeNumberSeparator(wxString& number) +wxString globalFunctions::includeNumberSeparator(const wxString& number) { - for (int i = number.size() - 3; i > 0; i-= 3) - number.insert(i, GlobalResources::THOUSANDS_SEPARATOR); - return number; + wxString output(number); + for (int i = output.size() - 3; i > 0; i -= 3) + output.insert(i, GlobalResources::THOUSANDS_SEPARATOR); + return output; } |