Commit Graph

1260 Commits

Author SHA1 Message Date
Marian Klymov
85a263e89f Fix improper format specifier in printf
%d in format string requires 'int' but the argument type is 'unsigned int'.
2018-06-02 19:38:12 +03:00
Christopher Dunn
cfab607c0d
Merge pull request #776 from BillyDonahue/apply_clang_format
Reapply clang format
2018-05-22 13:32:58 -05:00
Billy Donahue
b5e1fe89aa Apply the formatting specified in .clang-format file.
$ clang-format --version
  clang-format version 7.0.0 (tags/google/stable/2018-01-11)
  $ clang-format -i --style=file $(find . -name '*.cpp' -o -name '*.h')
2018-05-20 18:38:42 -04:00
Billy Donahue
abd39e791b json_tool missing include 2018-05-20 18:38:42 -04:00
Christopher Dunn
768e31fc68
Merge pull request #773 from BillyDonahue/precision
Improvements in writing precision and json_tool.h helpers.

resolves #772
2018-05-13 22:57:16 -05:00
Billy Donahue
aa1b383666 fix string construction 2018-05-13 18:28:05 -04:00
Billy Donahue
8bf20bdc35 Merge branch 'precision' of github.com:BillyDonahue/jsoncpp into precision 2018-05-11 14:31:51 -04:00
Billy Donahue
0ba5c435f4 Improvements in writing precision and json_tool.h helpers 2018-05-11 14:31:12 -04:00
Billy Donahue
fdcc2e4428 single-arg string ctor 2018-05-11 14:26:09 -04:00
Billy Donahue
9ebfc8d37b whitespace cleanup 2018-05-11 14:20:51 -04:00
Billy Donahue
4cec95a2e7 formatting refactor 2018-05-11 14:03:34 -04:00
fo40225
cf73619e28 refactoring cross compiler macro 2018-05-09 02:06:19 -05:00
Christopher Dunn
ded953e0a6
Merge pull request #771 from Binyang2014/master
Disable warning "C4702" when compiling json cpp using vs2013 and above

resolves #759
2018-05-09 02:04:08 -05:00
binyangl
0a62267fe4 Disable warning "C4702" when compiling json cpp using vs2013 and above 2018-05-08 20:55:30 +08:00
Christopher Dunn
2cc9b24f0d
Merge pull request #768 from fo40225/fix_msvc_fpfast
Fix msvc /fp:fast test failure
2018-05-08 00:30:14 -05:00
fo40225
6e5e9be736 corss compiler isnan 2018-05-08 12:35:08 +08:00
fo40225
4050143288 fix ValueTest/integers, CharReaderAllowSpecialFloatsTest/issue209 test failure when fp:fast on msvc 2018-05-05 15:05:22 +08:00
fo40225
3f0d91f08a fix ValueTest/specialFloats test failure when fp:fast on msvc 2018-05-05 14:38:53 +08:00
Christopher Dunn
02211117f1
Merge pull request #764 from Melown/master
allow out-of-source build
2018-04-20 00:22:22 -05:00
Tomáš Malý
323450eafc allow out-of-source build 2018-04-17 16:16:54 +02:00
Christopher Dunn
af17fecd29
Merge pull request #760 from ldionne/master
[CMake] Generate CMake config files by default
2018-04-05 19:36:03 -05:00
Louis Dionne
ffc62d26f3 [CMake] Generate CMake config files by default 2018-04-05 16:37:58 -07:00
Mike R
a07fc53287 Add setting precision for json writers and also add decimal places precision type. (#752)
* Added setting precision for writers.
* Added special case for precise precision and global precision.
* Added good setting of type of precision and also added this type to BuiltStreamWriter and for its settings.
* Added some tests.
2018-03-13 15:35:31 -05:00
Christopher Dunn
af2598cdd3
Merge pull request #751 from open-source-parsers/properly_swappable
Remove std::swap<Json::Value> in favor of ADL
2018-03-06 17:14:24 -06:00
Billy Donahue
1d95628ba8
Remove std::swap<Json::Value> in favor of ADL
Comply with http://en.cppreference.com/w/cpp/concept/Swappable
Don't open namespace std.
2018-03-06 12:51:58 -05:00
Christopher Dunn
3e2b8ea9cc
Minor changes for static analysis (#749)
re: #747
2018-03-03 12:51:17 -06:00
Christopher Dunn
1ab310e3ed
Merge pull request #748 from dueringa/feature/clarifyIndentDocumentation
Clarify documentation regarding indentation / newline
2018-03-03 09:46:36 -06:00
uvok cheetah
c7728e8658 Clarify documentation regarding indentation / newline 2018-03-03 12:45:54 +01:00
Christopher Dunn
313a0e4c34
Merge pull request #743 from tjanc/tjanc/fix-utf8-codepoint
Incorrect byte shift when interpreting 32-bit utf-8 codepoints
2018-02-14 10:33:35 -06:00
Thomas Jandecka
592d942b3b fix: byte shift when interpreting 32-bit utf-8 codepoints 2018-02-14 14:23:58 +01:00
luzpaz
5b45aa55ca Misc-typos (#741)
Found in downstream CMake repo via `codespell -q 3`
2018-02-08 19:05:50 -06:00
Christopher Dunn
07a324fb14
Merge pull request #736 from maxim-ky/master
Move the existing value to "removed" argument; removed is optional (could be nullptr)
2018-01-29 21:13:47 -06:00
Maxim Ky
1ec85c76a4 Value::removeMember arg "removed" is optional now (could be nullptr) 2018-01-29 16:59:24 +03:00
Maxim Ky
c27936e0aa Value::removeMember moves the existing value to "removed" now 2018-01-29 16:58:45 +03:00
drgler
04abe38148 Issue #731: Provide new JSONCPP_OP_EXPLICIT macro to restore VS 2012 support after recent introduction of explicit conversion function in JSON::Value. 2018-01-20 15:38:39 -06:00
Christof Krüger
edb4bdb7ec Do not deprecate whole class but only constructors of Json::Reader.
This should fix warning C4996 issued by Visual Studio in cases where
Json::Reader is not even used by client code.
2018-01-20 15:32:22 -06:00
Christopher Dunn
0ced843c97
Merge pull request #726 from okodron/fix-704
Value::copy() creates a deep copy now
2018-01-20 15:27:46 -06:00
Andrey Okoshkin
9b569c8ce3 Make Value copy constructor simplier
Helper private methods Value::dupPayload() and Value::dupMeta() are added.
Value copy constructor doesn't attempt to delete its data first.
* Value::dupPayload() duplicates a payload.
* Value::dupMeta() duplicates comments and an offset position with a limit.
2018-01-12 15:59:20 +03:00
Andrey Okoshkin
392e3a5b49 Add basic test for Value::copy() (#704) 2018-01-12 14:36:01 +03:00
Andrey Okoshkin
c69148c946 Fix Value::copyPayload() and Value::copy() (#704)
Value copy constructor shares the same code with Value::copy() and Value::copyPayload().
New Value::releasePayload() is used to free payload memory.
Fixes: #704
2018-01-12 14:33:47 +03:00
Christopher Dunn
2f227cb122
Merge pull request #718 from dbeurle/master
CZString as public when using NVCC, see issue #486
2017-12-22 23:19:07 -06:00
Darcy Beurle
798f6ba055
CZString as public when using NVCC, see issue #486 2017-12-22 22:48:20 +01:00
Christopher Dunn
72f6cc7fd0
Merge pull request #716 from cdunn2001/master
Speed up TravisCI build
2017-12-21 02:33:50 -06:00
Christopher Dunn
d3ce75c74e pyenv global 3.6
We need pip3, and TravisCI build error says:

    The `pip3` command exists in these Python versions: 3.6, 3.6.3
2017-12-21 02:05:52 -06:00
Christopher Dunn
de5fb8e022 Try to use default python on Trusty, for speed
Running `pyenv install` wastes about 3 minutes.

* https://docs.travis-ci.com/user/languages/python

    "for Trusty, this means 2.7.6 and 3.4.3"
2017-12-21 01:27:38 -06:00
Christopher Dunn
899894f0f5
-std=c++11 (#715)
We set this is the Meson build to eliminate warnings, but
c++0x should still work, at least for now.

See #695 for discussion.
2017-12-21 01:22:40 -06:00
Christopher Dunn
ddabf50f72 1.8.4; soversion=20 2017-12-20 15:07:10 -06:00
Christopher Dunn
63ab03ca28
replace code point in range(0xD800, 0xDFFF) to replacement mark (#714)
closes #712
2017-12-20 14:43:55 -06:00
Christopher Dunn
41ff85f443
pyenv install (#713)
```
Unfortunately, since our latest image update, Python 3.5 doesn't come pre-installed anymore. Hence, you will have to install it via `pyenv` as a first step e.g.

before_install
  - pyenv install 3.5.0 && pyenv global 3.5.0

support@travis-ci.com
```
2017-12-20 14:24:51 -06:00
Wolfram Rösler
9079422ac1 Allow Json::Value to be used in a boolean context (#695)
Must bump soversion too.
2017-12-05 11:18:55 -06:00