mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-04-20 16:03:34 +02:00
Don't use unique_ptr on pre-c++11 branch
Don't use C++11 unique_ptr in the 0.y.z branch. Although this usage is guarded with __cplusplus >= 201103 some build configurations (notably chromium) use a C++11-compliant compiler but a pre-11 library. pull #238
This commit is contained in:
parent
f4bdc1b602
commit
db7ad75794
@ -32,11 +32,7 @@ static int stackDepth_g = 0; // see readValue()
|
|||||||
|
|
||||||
namespace Json {
|
namespace Json {
|
||||||
|
|
||||||
#if __cplusplus >= 201103L
|
|
||||||
typedef std::unique_ptr<CharReader> CharReaderPtr;
|
|
||||||
#else
|
|
||||||
typedef std::auto_ptr<CharReader> CharReaderPtr;
|
typedef std::auto_ptr<CharReader> CharReaderPtr;
|
||||||
#endif
|
|
||||||
|
|
||||||
// Implementation of class Features
|
// Implementation of class Features
|
||||||
// ////////////////////////////////
|
// ////////////////////////////////
|
||||||
|
@ -40,11 +40,7 @@
|
|||||||
|
|
||||||
namespace Json {
|
namespace Json {
|
||||||
|
|
||||||
#if __cplusplus >= 201103L
|
|
||||||
typedef std::unique_ptr<StreamWriter> StreamWriterPtr;
|
|
||||||
#else
|
|
||||||
typedef std::auto_ptr<StreamWriter> StreamWriterPtr;
|
typedef std::auto_ptr<StreamWriter> StreamWriterPtr;
|
||||||
#endif
|
|
||||||
|
|
||||||
static bool containsControlCharacter(const char* str) {
|
static bool containsControlCharacter(const char* str) {
|
||||||
while (*str) {
|
while (*str) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user