diff options
Diffstat (limited to 'shared/global_func.h')
-rw-r--r-- | shared/global_func.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/shared/global_func.h b/shared/global_func.h index 9dd1faf7..1c6bf0ae 100644 --- a/shared/global_func.h +++ b/shared/global_func.h @@ -19,7 +19,7 @@ namespace common { //little rounding function -inline int round(double d) { return static_cast<int>(d < 0 ? d - .5 : d + .5); } +inline int round(double d) { return static_cast<int>(d < 0 ? d - 0.5 : d + 0.5); } //absolute value template <class T> inline T abs(const T& d) { return d < 0 ? -d : d; } @@ -54,7 +54,7 @@ private: wxFile* logFile; //logFile.close(); <- not needed }; extern DebugLog logDebugInfo; -wxString getCodeLocation(const wxString file, const int line); +wxString getCodeLocation(const wxString& file, int line); //small macro for writing debug information into a logfile #define WRITE_DEBUG_LOG(x) logDebugInfo.write(getCodeLocation(__TFILE__, __LINE__) + x); |