Browse Source

Make the eof code compile on windows

Bart van Strien 14 years ago
parent
commit
3da5b3fd46
1 changed files with 6 additions and 3 deletions
  1. 6 3
      src/modules/filesystem/physfs/File.cpp

+ 6 - 3
src/modules/filesystem/physfs/File.cpp

@@ -169,10 +169,13 @@ namespace physfs
 	}
 	}
 
 
 #ifdef LOVE_WINDOWS
 #ifdef LOVE_WINDOWS
-	inline bool test_eof(File * this, PHYSFS_File *)
+	// MSVC doesn't like the 'this' keyword
+	// well, we'll use 'that'.
+	// It zigs, we zag.
+	inline bool test_eof(File * that, PHYSFS_File *)
 	{
 	{
-		int pos = this->tell();
-		int size = this->getSize();
+		int pos = that->tell();
+		int size = that->getSize();
 		return pos == -1 || size == -1 || pos >= size;
 		return pos == -1 || size == -1 || pos >= size;
 	}
 	}
 #else
 #else