diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:10:11 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:10:11 +0200 |
commit | c0cdb2ad99a1e2a6ade5ce76c91177a79258e669 (patch) | |
tree | 4701a015385d9a6a5a4ba99a8f1f5d400fff26b1 /shared/global_func.h | |
parent | 3.13 (diff) | |
download | FreeFileSync-c0cdb2ad99a1e2a6ade5ce76c91177a79258e669.tar.gz FreeFileSync-c0cdb2ad99a1e2a6ade5ce76c91177a79258e669.tar.bz2 FreeFileSync-c0cdb2ad99a1e2a6ade5ce76c91177a79258e669.zip |
3.14
Diffstat (limited to 'shared/global_func.h')
-rw-r--r-- | shared/global_func.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/shared/global_func.h b/shared/global_func.h index 169ad611..e0f5434a 100644 --- a/shared/global_func.h +++ b/shared/global_func.h @@ -38,14 +38,14 @@ T abs(const T& d) //absolute value } -//number conversion C++ ANSI/wide char versions +//formatted number conversion C++ ANSI/wide char versions template <class CharType, class T> std::basic_string<CharType> numberToString(const T& number); //convert number to string the C++ way template <class T, class CharType> T stringToNumber(const std::basic_string<CharType>& input); //convert number to string the C++ way -//number conversion wxWidgets +//formatted number conversion wxWidgets template <class T> wxString numberToString(const T& number); template <class T> T stringToNumber(const wxString& input); @@ -78,13 +78,15 @@ class wxFile; class DebugLog { public: - wxDEPRECATED(DebugLog()); + wxDEPRECATED(DebugLog(const wxString& filePrefix = wxString())); ~DebugLog(); void write(const wxString& logText); private: wxString assembleFileName(); + wxString logfileName; + wxString prefix; int lineCount; wxFile* logFile; //logFile.close(); <- not needed }; @@ -130,9 +132,8 @@ template <class T, class CharType> inline T common::stringToNumber(const std::basic_string<CharType>& input) //convert number to string the C++ way { - std::basic_istringstream<CharType> ss(input); - T number; - ss >> number; + T number = 0; + std::basic_istringstream<CharType>(input) >> number; return number; } |