From 22f53dd0ce69720a7d1b7f0026980252fecde5a3 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 24 Oct 2002 05:06:45 +0000 Subject: [PATCH] Turn off another warning (I believe DXUtil or something was turning this off previously). Add inactive code to use StdString. Add wrapper for CString to give us GetString in VC6. It'll go away eventually. --- stepmania/src/StdAfx.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/stepmania/src/StdAfx.h b/stepmania/src/StdAfx.h index 7bd91e5985..8f5875255d 100644 --- a/stepmania/src/StdAfx.h +++ b/stepmania/src/StdAfx.h @@ -26,6 +26,7 @@ * Actually, this is a valid warning, but we do it all over the * place, eg. with ScreenMessages. Those should be fixed, but later. XXX */ #pragma warning (disable : 4063) +#pragma warning (disable : 4127) #endif #include // MFC core and standard components @@ -40,6 +41,33 @@ #include "STDCarray.h" +#if 0 +#include "StdString.h" + +/* Use CStdString: */ +#define CString CStdString +#define CStringArray StdCArray +#else + +/* Arg. VC7's CString has GetString(), an equivalent of c_str(). + * VC6 doesn't have that. We need it to transition to std::string + * sanely. So, sneakily add it. This goes away when we finish + * transitioning. */ +#if _MSC_VER < 1300 /* VC6, not VC7 */ +class CStringTemp: public CString { +public: + CStringTemp() {} + CStringTemp(const char *s): CString(s) { } + CStringTemp(const CString &s): CString(s) {} + + const char *GetString() const { return (const char *) *this; } +}; +#define CString CStringTemp +#define CStringArray CArray +#endif + +#endif + /* Include this here to make sure our assertion handler is always * used. (This file is a dependency of most everything anyway, * so there's no real problem putting it here.) */