Commits

Jason McKesson committed c788eae

No more case-insensitive comparisons.
Also, got rid of ISO C++ cast warnings on Windows.

  • Participants
  • Parent commits b5c722f
  • Branches 0.2

Comments (0)

Files changed (4)

File data/gl_specloaderfunc.lua

 #pragma warning(disable: 4054)
 #endif
 
-static int TestPointer(const void *pTest)
+static int TestPointer(const PROC pTest)
 {
 	ptrdiff_t iTest;
 	if(!pTest) return 0;
 	return 1;
 }
 
-static void *WinGetProcAddress(const char *name)
+static PROC WinGetProcAddress(const char *name)
 {
 	HMODULE glMod = NULL;
-	void *pFunc = (void*)wglGetProcAddress((LPCSTR)name);
+	PROC pFunc = wglGetProcAddress((LPCSTR)name);
 	if(TestPointer(pFunc))
 	{
 		return pFunc;
 	}
 	glMod = GetModuleHandleA("OpenGL32.dll");
-	return (void*)GetProcAddress(glMod, (LPCSTR)name);
+	return (PROC)GetProcAddress(glMod, (LPCSTR)name);
 }
 	
 #define IntGetProcAddress(name) WinGetProcAddress(name)

File extfiles/gl_plat_3_3.txt

 -- These extensions are fairly widely implemented.
 
 NV_texture_barrier 
+NV_copy_image

File modules/StylePointerC.lua

 #include <stdlib.h>
 #include <string.h>
 #ifdef _MSC_VER
-#define strcasecmp(lhs, rhs) _stricmp((lhs), (rhs))
 #endif
 ]])
 	hFile:write("\n")
 	hFile:writeblock([[
 for(loop = 0; loop < g_extensionMapSize; ++loop, ++currLoc)
 {
-	if(strcasecmp(extensionName, currLoc->extensionName) == 0)
+	if(strcmp(extensionName, currLoc->extensionName) == 0)
 		return currLoc;
 }
 

File modules/StylePointerCPP.lua

 #include <vector>
 #include <string.h>
 #ifdef _MSC_VER
-#define strcasecmp(lhs, rhs) _stricmp((lhs), (rhs))
 #endif
 ]])
 end
 struct MapCompare
 {
 	MapCompare(const char *test_) : test(test_) {}
-	bool operator()(const MapEntry &other) { return strcasecmp(test, other.extName) == 0; }
+	bool operator()(const MapEntry &other) { return strcmp(test, other.extName) == 0; }
 	const char *test;
 };