From 3da5b3fd46de2aef5d929d24c8b9d5cc0170cb9c Mon Sep 17 00:00:00 2001 From: Bart van Strien Date: Mon, 8 Aug 2011 15:32:34 +0200 Subject: [PATCH] Make the eof code compile on windows --- src/modules/filesystem/physfs/File.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/modules/filesystem/physfs/File.cpp b/src/modules/filesystem/physfs/File.cpp index dbb0df43d..5a9f242ac 100644 --- a/src/modules/filesystem/physfs/File.cpp +++ b/src/modules/filesystem/physfs/File.cpp @@ -169,10 +169,13 @@ namespace physfs } #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; } #else