Browse Source

Removed the sstream header from juce_StandardHeader.h

tags/2021-05-28
tpoole 8 years ago
parent
commit
3933c5f8f9
2 changed files with 12 additions and 12 deletions
  1. +1
    -1
      modules/juce_core/system/juce_StandardHeader.h
  2. +11
    -11
      modules/juce_core/text/juce_CharacterFunctions.h

+ 1
- 1
modules/juce_core/system/juce_StandardHeader.h View File

@@ -50,7 +50,6 @@
#include <functional> #include <functional>
#include <algorithm> #include <algorithm>
#include <limits> #include <limits>
#include <sstream>
//============================================================================== //==============================================================================
#include "juce_CompilerSupport.h" #include "juce_CompilerSupport.h"
@@ -66,6 +65,7 @@
#if JUCE_MAC || JUCE_IOS #if JUCE_MAC || JUCE_IOS
#include <libkern/OSAtomic.h> #include <libkern/OSAtomic.h>
#include <xlocale.h>
#endif #endif
#if JUCE_LINUX #if JUCE_LINUX


+ 11
- 11
modules/juce_core/text/juce_CharacterFunctions.h View File

@@ -218,17 +218,17 @@ public:
*currentCharacter++ = '0'; *currentCharacter++ = '0';
} }
double result = 0;
const size_t stringSize = (size_t) (currentCharacter - &buffer[0]) + 1;
if (stringSize > 1)
{
std::istringstream is (std::string (&buffer[0], stringSize));
is.imbue (std::locale ("C"));
is >> result;
}
return result;
#if JUCE_MSVC
static _locale_t locale = _create_locale (LC_ALL, "C");
return _strtod_l (&buffer[0], nullptr, locale);
#else
static locale_t locale = newlocale (LC_ALL_MASK, "C", nullptr);
#if JUCE_ANDROID
return (double) strtold_l (&buffer[0], nullptr, locale);
#else
return strtod_l (&buffer[0], nullptr, locale);
#endif
#endif
} }
/** Parses a character string, to read a floating-point value. */ /** Parses a character string, to read a floating-point value. */


Loading…
Cancel
Save