Common: Remove locale based functions from CommonFuncs.

Since %f isn't used anymore in the shader generators, these can go.
This commit is contained in:
Lioncash
2014-12-05 20:54:41 -05:00
parent f7a16eca84
commit 9bcadc8029
6 changed files with 1 additions and 107 deletions

View File

@ -5,10 +5,6 @@
#include <cassert>
#include <cmath>
#include <cstdio>
#include <locale.h>
#ifdef __APPLE__
#include <xlocale.h>
#endif
#include "VideoCommon/BoundingBox.h"
#include "VideoCommon/BPMemory.h"
@ -160,15 +156,6 @@ static inline void GeneratePixelShader(T& out, DSTALPHA_MODE dstAlphaMode, API_T
out.SetBuffer(text);
const bool is_writing_shadercode = (out.GetBuffer() != nullptr);
#ifndef ANDROID
locale_t locale;
locale_t old_locale;
if (is_writing_shadercode)
{
locale = newlocale(LC_NUMERIC_MASK, "C", nullptr); // New locale for compilation
old_locale = uselocale(locale); // Apply the locale for this thread
}
#endif
if (is_writing_shadercode)
text[sizeof(text) - 1] = 0x7C; // canary
@ -596,11 +583,6 @@ static inline void GeneratePixelShader(T& out, DSTALPHA_MODE dstAlphaMode, API_T
{
if (text[sizeof(text) - 1] != 0x7C)
PanicAlert("PixelShader generator - buffer too small, canary has been eaten!");
#ifndef ANDROID
uselocale(old_locale); // restore locale
freelocale(locale);
#endif
}
}