1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-18 11:19:10 +00:00

Merge pull request #429 from zrax/deprecated

Mark plString::Format as deprecated
This commit is contained in:
2014-05-24 22:38:18 -04:00
9 changed files with 148 additions and 47 deletions

View File

@ -8,36 +8,6 @@ add_definitions(-DPRODUCT_SHORT_NAME="${PRODUCT_SHORT_NAME}")
add_definitions(-DPRODUCT_LONG_NAME="${PRODUCT_LONG_NAME}")
add_definitions(-DPRODUCT_UUID="${PRODUCT_UUID}")
include(CheckTypeSize)
if(NOT WCHAR_BYTES)
check_type_size("wchar_t" WCHAR_BYTES)
if(NOT WCHAR_BYTES)
message(FATAL_ERROR "Could not determine sizeof(wchar_t)")
set(WCHAR_BYTES 0)
endif()
endif()
add_definitions(-DWCHAR_BYTES=${WCHAR_BYTES})
if(NOT SIZEOF_LONG)
check_type_size("long" SIZEOF_LONG)
if(NOT SIZEOF_LONG)
message(FATAL_ERROR "Could not determine sizeof(long)")
set(SIZEOF_LONG 0)
endif()
endif()
add_definitions(-DSIZEOF_LONG=${SIZEOF_LONG})
try_compile(HAVE_CPUID ${PROJECT_BINARY_DIR}
${PROJECT_SOURCE_DIR}/cmake/check_cpuid.cpp
OUTPUT_VARIABLE OUTPUT)
if(HAVE_CPUID)
add_definitions(-DHAVE_CPUID)
message("CPUID header found -- using hardware math acceleration when available")
else()
message("CPUID header not found -- using software math")
endif()
set(CoreLib_SOURCES
HeadSpin.cpp
hsBitVector.cpp

View File

@ -42,6 +42,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#ifndef HeadSpinHDefined
#define HeadSpinHDefined
// Ensure these get set consistently regardless of what module includes it
#include "hsCompilerSpecific.h"
#if (defined(_DEBUG) || defined(UNIX_DEBUG))
# define HS_DEBUGGING
#endif // defined(_DEBUG) || defined(UNIX_DENUG)
@ -138,6 +141,15 @@ typedef uint32_t hsGSeedValue;
#define hsFourByteTag(a, b, c, d) (((uint32_t)(a) << 24) | ((uint32_t)(b) << 16) | ((uint32_t)(c) << 8) | (d))
#if defined(HAVE_CXX14_DEPRECATED_ATTR)
# define hsDeprecated(message) [[deprecated(message)]]
#elif defined(HAVE_GCC_DEPRECATED_ATTR)
# define hsDeprecated(message) __attribute__((deprecated(message)))
#elif defined(_MSC_VER)
# define hsDeprecated(message) __declspec(deprecated(message))
#else
# define hsDeprecated(message)
#endif
//======================================
// Endian swap funcitions

View File

@ -40,6 +40,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/
#include "hsCompilerSpecific.h"
#if defined(HAVE_CPUID)
# if defined(_MSC_VER) || ((defined(_WIN32) || defined(_WIN64)) && defined(__INTEL_COMPILER))
# include <intrin.h>

View File

@ -43,12 +43,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#ifndef plString_Defined
#define plString_Defined
#include <cstddef>
#include <cstdlib>
#include <cstring>
#include <cstdarg>
#include <cstdint>
#include <cctype>
#include "HeadSpin.h"
#include <vector>
/** Single Unicode character code unit */
@ -409,12 +404,14 @@ public:
double ToDouble() const;
/** Construct a plString using a printf-like format string. */
hsDeprecated("plString::Format is deprecated -- use plFormat instead")
static plString Format(const char *fmt, ...);
/** Construct a plString using a printf-like format string.
* This function should be called inside of vararg functions, such as
* plString::Format().
*/
hsDeprecated("plString::IFormat is deprecated -- use plFormat instead")
static plString IFormat(const char *fmt, va_list vptr);
enum CaseSensitivity {