Kaynağa Gözat

Merge pull request #715 from dgough/next

Fixed DebugMem compile error in Visual Studio
Sean Paul Taylor 13 yıl önce
ebeveyn
işleme
4966d03727

+ 2 - 2
gameplay-encoder/src/FileIO.h

@@ -29,7 +29,7 @@ void fprintfElement(FILE* file, const char* elementName, const std::string& valu
 void fprintfElement(FILE* file, const char* elementName, const float values[], int length);
 
 template <class T>
-void fprintfElement(FILE* file, const char* format, const char* elementName, std::vector<T> list)
+void fprintfElement(FILE* file, const char* format, const char* elementName, std::vector<T>& list)
 {
     fprintf(file, "<%s count=\"%lu\">", elementName, list.size());
     typename std::vector<T>::const_iterator i;
@@ -41,7 +41,7 @@ void fprintfElement(FILE* file, const char* format, const char* elementName, std
 }
 
 template <class T>
-void fprintfElement(FILE* file, const char* format, const char* elementName, std::list<T> list)
+void fprintfElement(FILE* file, const char* format, const char* elementName, std::list<T>& list)
 {
     fprintf(file, "<%s count=\"%lu\">", elementName, list.size());
     typename std::list<T>::const_iterator i;

+ 1 - 1
gameplay/gameplay.vcxproj

@@ -922,7 +922,7 @@
       </PrecompiledHeader>
       <WarningLevel>Level3</WarningLevel>
       <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>USE_XINPUT;_ITERATOR_DEBUG_LEVEL=0;WIN32;_DEBUG;_LIB;GAMEPLAY_MEM_LEAK_DETECTION;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>_ITERATOR_DEBUG_LEVEL=0;WIN32;_DEBUG;_LIB;GAMEPLAY_MEM_LEAK_DETECTION;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <AdditionalIncludeDirectories>$(ProjectDir)src;..\external-deps\lua\include;..\external-deps\bullet\include;..\external-deps\openal\include\AL;..\external-deps\alut\include\AL;..\external-deps\oggvorbis\include;..\external-deps\glew\include;..\external-deps\libpng\include;..\external-deps\zlib\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <RuntimeTypeInfo>true</RuntimeTypeInfo>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

+ 2 - 2
gameplay/src/DebugNew.cpp

@@ -106,7 +106,7 @@ void* debugAlloc(std::size_t size, const char* file, int line)
     mem += sizeof(MemoryAllocationRecord);
 
     rec->address = (unsigned long)mem;
-    rec->size = size;
+    rec->size = (unsigned int)size;
     rec->file = file;
     rec->line = line;
     rec->next = __memoryAllocations;
@@ -114,7 +114,7 @@ void* debugAlloc(std::size_t size, const char* file, int line)
 
     // Capture the stack frame (up to MAX_STACK_FRAMES) if we 
     // are running on Windows and the user has enabled it.
-#if defined(WIN32)
+#if defined(WIN32) && defined(_M_IX86)
     rec->trackStackTrace = __trackStackTrace;
     if (rec->trackStackTrace)
     {