summaryrefslogtreecommitdiff
path: root/library/globalFunctions.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 16:57:45 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 16:57:45 +0200
commit2a3ebac62eb6dd88122c0f447ea90ce368373d3a (patch)
treefae5c18deaecfb6f39d4d66dd3de8ce730b2025b /library/globalFunctions.cpp
parent1.17 (diff)
downloadFreeFileSync-2a3ebac62eb6dd88122c0f447ea90ce368373d3a.tar.gz
FreeFileSync-2a3ebac62eb6dd88122c0f447ea90ce368373d3a.tar.bz2
FreeFileSync-2a3ebac62eb6dd88122c0f447ea90ce368373d3a.zip
1.18
Diffstat (limited to 'library/globalFunctions.cpp')
-rw-r--r--library/globalFunctions.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/library/globalFunctions.cpp b/library/globalFunctions.cpp
index 4b387293..7c4a1b92 100644
--- a/library/globalFunctions.cpp
+++ b/library/globalFunctions.cpp
@@ -2,6 +2,7 @@
#include "resources.h"
#include <wx/msgdlg.h>
#include <wx/file.h>
+#include <fstream>
std::string globalFunctions::numberToString(const unsigned int number)
@@ -20,6 +21,14 @@ std::string globalFunctions::numberToString(const int number)
}
+std::string globalFunctions::numberToString(const long number)
+{
+ char result[100];
+ sprintf(result, "%ld", number);
+ return std::string(result);
+}
+
+
std::string globalFunctions::numberToString(const float number)
{
char result[100];
@@ -52,14 +61,18 @@ int globalFunctions::stringToInt(const std::string& number)
}
-inline
+long globalFunctions::stringToLong(const std::string& number)
+{
+ return atol(number.c_str());
+}
+
+
double globalFunctions::stringToDouble(const std::string& number)
{
return atof(number.c_str());
}
-inline
int globalFunctions::wxStringToInt(const wxString& number)
{
long result = 0;
@@ -70,7 +83,6 @@ int globalFunctions::wxStringToInt(const wxString& number)
}
-inline
double globalFunctions::wxStringToDouble(const wxString& number)
{
double result = 0;
bgstack15