mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-17 04:39:34 +00:00
Remove snprintf compatibility hacks for MSVC versions before 2015
This commit is contained in:
parent
42cb559a8d
commit
ff3d799871
@ -17,12 +17,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "base/compat.h"
|
||||
#include "CommonTypes.h"
|
||||
|
||||
template <bool> struct CompileTimeAssert;
|
||||
template<> struct CompileTimeAssert<true> {};
|
||||
|
||||
#ifndef ARRAY_SIZE
|
||||
#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
|
||||
#endif
|
||||
|
@ -20,8 +20,6 @@
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
#include "base/compat.h"
|
||||
|
||||
#include "Common/ChunkFile.h"
|
||||
#include "Core/HLE/HLE.h"
|
||||
#include "Core/HLE/FunctionWrappers.h"
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "base/compat.h"
|
||||
#include "gfx_es2/gpu_features.h"
|
||||
#include "i18n/i18n.h"
|
||||
#include "ui/ui_context.h"
|
||||
|
@ -304,7 +304,6 @@
|
||||
<ClInclude Include="..\..\ext\native\base\basictypes.h" />
|
||||
<ClInclude Include="..\..\ext\native\base\buffer.h" />
|
||||
<ClInclude Include="..\..\ext\native\base\colorutil.h" />
|
||||
<ClInclude Include="..\..\ext\native\base\compat.h" />
|
||||
<ClInclude Include="..\..\ext\native\base\display.h" />
|
||||
<ClInclude Include="..\..\ext\native\base\linked_ptr.h" />
|
||||
<ClInclude Include="..\..\ext\native\base\logging.h" />
|
||||
@ -394,7 +393,6 @@
|
||||
<ClCompile Include="..\..\ext\native\base\backtrace.cpp" />
|
||||
<ClCompile Include="..\..\ext\native\base\buffer.cpp" />
|
||||
<ClCompile Include="..\..\ext\native\base\colorutil.cpp" />
|
||||
<ClCompile Include="..\..\ext\native\base\compat.cpp" />
|
||||
<ClCompile Include="..\..\ext\native\base\display.cpp" />
|
||||
<ClCompile Include="..\..\ext\native\base\logging.cpp" />
|
||||
<ClCompile Include="..\..\ext\native\base\stringutil.cpp" />
|
||||
@ -1317,4 +1315,4 @@
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
@ -70,9 +70,6 @@
|
||||
<ClCompile Include="..\..\ext\native\base\colorutil.cpp">
|
||||
<Filter>base</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\ext\native\base\compat.cpp">
|
||||
<Filter>base</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\ext\native\base\display.cpp">
|
||||
<Filter>base</Filter>
|
||||
</ClCompile>
|
||||
@ -476,9 +473,6 @@
|
||||
<ClInclude Include="..\..\ext\native\base\colorutil.h">
|
||||
<Filter>base</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\ext\native\base\compat.h">
|
||||
<Filter>base</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\ext\native\base\display.h">
|
||||
<Filter>base</Filter>
|
||||
</ClInclude>
|
||||
@ -726,4 +720,4 @@
|
||||
<Filter>gfx</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
@ -1,12 +1,10 @@
|
||||
#include <stdio.h>
|
||||
#include <cstdio>
|
||||
|
||||
#include "base/compat.h"
|
||||
#include "util/text/utf8.h"
|
||||
|
||||
#include "BreakpointWindow.h"
|
||||
#include "../resource.h"
|
||||
|
||||
|
||||
BreakpointWindow* BreakpointWindow::bp;
|
||||
|
||||
INT_PTR CALLBACK BreakpointWindow::dlgFunc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
|
||||
|
@ -9,7 +9,6 @@ LOCAL_ARM_MODE := arm
|
||||
LOCAL_SRC_FILES :=\
|
||||
base/backtrace.cpp \
|
||||
base/buffer.cpp \
|
||||
base/compat.cpp \
|
||||
base/display.cpp \
|
||||
base/timeutil.cpp \
|
||||
base/colorutil.cpp \
|
||||
|
@ -1,28 +0,0 @@
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "base/compat.h"
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1900
|
||||
|
||||
static int c99_vsnprintf(char* str, size_t size, const char* format, va_list ap) {
|
||||
int count = -1;
|
||||
if (size != 0)
|
||||
count = _vsnprintf_s(str, size, _TRUNCATE, format, ap);
|
||||
if (count == -1)
|
||||
count = _vscprintf(format, ap);
|
||||
return count;
|
||||
}
|
||||
|
||||
int c99_snprintf(char* str, size_t size, const char* format, ...) {
|
||||
int count;
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, format);
|
||||
count = c99_vsnprintf(str, size, format, ap);
|
||||
va_end(ap);
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
#endif
|
@ -1,11 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// Implement C99 functions and similar that are missing in MSVC.
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1900
|
||||
|
||||
int c99_snprintf(char* str, size_t size, const char* format, ...);
|
||||
#define snprintf c99_snprintf
|
||||
#define vscprintf _vscprintf
|
||||
|
||||
#endif
|
@ -4,7 +4,6 @@
|
||||
|
||||
#include "base/arch.h"
|
||||
#include "base/backtrace.h"
|
||||
#include "base/compat.h"
|
||||
|
||||
// Simple wrapper around Android's logging interface that also allows other
|
||||
// implementations, and also some misc utilities.
|
||||
|
@ -1,8 +1,7 @@
|
||||
#include "math/lin/matrix4x4.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <cstdio>
|
||||
|
||||
#include "base/compat.h"
|
||||
#include "math/lin/vec3.h"
|
||||
#include "math/lin/quat.h"
|
||||
#include "math/fast/fast_matrix.h"
|
||||
|
@ -196,7 +196,6 @@
|
||||
<ClInclude Include="base\basictypes.h" />
|
||||
<ClInclude Include="base\buffer.h" />
|
||||
<ClInclude Include="base\colorutil.h" />
|
||||
<ClInclude Include="base\compat.h" />
|
||||
<ClInclude Include="base\display.h" />
|
||||
<ClInclude Include="base\logging.h" />
|
||||
<ClInclude Include="base\NativeApp.h" />
|
||||
@ -295,7 +294,6 @@
|
||||
<ClCompile Include="base\backtrace.cpp" />
|
||||
<ClCompile Include="base\buffer.cpp" />
|
||||
<ClCompile Include="base\colorutil.cpp" />
|
||||
<ClCompile Include="base\compat.cpp" />
|
||||
<ClCompile Include="base\display.cpp" />
|
||||
<ClCompile Include="base\logging.cpp" />
|
||||
<ClCompile Include="base\PCMain.cpp">
|
||||
@ -758,4 +756,4 @@
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
@ -281,9 +281,6 @@
|
||||
<ClInclude Include="thread\executor.h">
|
||||
<Filter>thread</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="base\compat.h">
|
||||
<Filter>base</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="gfx\gl_common.h">
|
||||
<Filter>gfx</Filter>
|
||||
</ClInclude>
|
||||
@ -736,9 +733,6 @@
|
||||
<ClCompile Include="thread\executor.cpp">
|
||||
<Filter>thread</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="base\compat.cpp">
|
||||
<Filter>base</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="base\PCMain.cpp">
|
||||
<Filter>base</Filter>
|
||||
</ClCompile>
|
||||
@ -859,4 +853,4 @@
|
||||
<UniqueIdentifier>{06c6305a-a646-485b-85b9-645a24dd6553}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
Loading…
x
Reference in New Issue
Block a user