mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-31 03:00:05 +00:00
Removed the sstream header from juce_StandardHeader.h
This commit is contained in:
parent
9600016294
commit
3933c5f8f9
2 changed files with 12 additions and 12 deletions
|
|
@ -50,7 +50,6 @@
|
|||
#include <functional>
|
||||
#include <algorithm>
|
||||
#include <limits>
|
||||
#include <sstream>
|
||||
|
||||
//==============================================================================
|
||||
#include "juce_CompilerSupport.h"
|
||||
|
|
@ -66,6 +65,7 @@
|
|||
|
||||
#if JUCE_MAC || JUCE_IOS
|
||||
#include <libkern/OSAtomic.h>
|
||||
#include <xlocale.h>
|
||||
#endif
|
||||
|
||||
#if JUCE_LINUX
|
||||
|
|
|
|||
|
|
@ -218,17 +218,17 @@ public:
|
|||
*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. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue