]> git.jsancho.org Git - lugaru.git/blobdiff - Source/WinDefs.cpp
Applied clang-format on all files
[lugaru.git] / Source / WinDefs.cpp
index 3bca88542ffc81d26394b2790c0d55e894229407..f30e129cc94297fc7a07f14052efaf29e62b28f0 100644 (file)
@@ -18,22 +18,22 @@ You should have received a copy of the GNU General Public License
 along with Lugaru.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-/**> HEADER FILES <**/
-#include "WinDefs.h"
-#include <windows.h>
+#include "WinDefs.hpp"
+
 #include <errno.h>
-#include <time.h>
 #include <stdio.h>
-
+#include <time.h>
+#include <windows.h>
 
 class AppTime
 {
-public:
-    AppTime() {
+  public:
+    AppTime()
+    {
         counterRate = 1;
         baseCounter = 0;
-        QueryPerformanceFrequency( (LARGE_INTEGER*)&counterRate);
-        QueryPerformanceCounter( (LARGE_INTEGER*)&baseCounter);
+        QueryPerformanceFrequency((LARGE_INTEGER*)&counterRate);
+        QueryPerformanceCounter((LARGE_INTEGER*)&baseCounter);
     }
     __int64 counterRate; // LARGE_INTEGER type has no math functions so use int64
     __int64 baseCounter;
@@ -43,7 +43,7 @@ static AppTime g_appTime;
 AbsoluteTime UpTime()
 {
     __int64 counter;
-    QueryPerformanceCounter( (LARGE_INTEGER*)&counter);
+    QueryPerformanceCounter((LARGE_INTEGER*)&counter);
 
     counter -= g_appTime.baseCounter;
 
@@ -53,8 +53,7 @@ AbsoluteTime UpTime()
     return time;
 }
 
-
-Duration AbsoluteDeltaToDuration( AbsoluteTime& a, AbsoluteTime& b)
+Duration AbsoluteDeltaToDuration(AbsoluteTime& a, AbsoluteTime& b)
 {
     __int64 value = a.hi;
     value <<= 32;
@@ -86,25 +85,3 @@ Duration AbsoluteDeltaToDuration( AbsoluteTime& a, AbsoluteTime& b)
 
     return time;
 }
-
-
-static char g_filename[ 256];
-char* ConvertFileName( const char* orgfilename)
-{
-    // translate filename into proper path name
-    if (orgfilename[ 0] == ':')
-        orgfilename++;
-    strcpy( g_filename, orgfilename);
-
-    for (int n = 0; g_filename[ n]; n++) {
-        if (g_filename[ n] == ':')
-            g_filename[ n] = '/';
-    }
-
-    return g_filename;
-}
-
-char* ConvertFileName( const char* orgfilename, const char* junk)
-{
-    return ConvertFileName(orgfilename);
-}