311 Commits

Author SHA1 Message Date
Milo Yip
6225092355 Travis config trial: git config --global 2014-07-12 18:42:26 +08:00
Milo Yip
ca05d85183 Revert "Travis config trial: using original name/email"
This reverts commit ded7dc723d0609111f5c2df0ff32eeaf0894b2d9.
2014-07-12 18:34:29 +08:00
Milo Yip
ded7dc723d Travis config trial: using original name/email 2014-07-12 18:30:19 +08:00
Milo Yip
75bee4cd76 Update token 2014-07-12 18:24:32 +08:00
Milo Yip
75d7bfe3be Revert "Update token"
This reverts commit fd9bc121553bfe1f9e7c3dd70918fe90350db799.
2014-07-12 18:24:13 +08:00
Milo Yip
fd9bc12155 Update token 2014-07-12 18:20:16 +08:00
Milo Yip
3096970720 Merge pull request #63 from pah/fixes/value-assign
GenericValue::operator= : fixup assignment operator (again)
2014-07-11 23:56:56 +08:00
Milo Yip
31113b4f52 Merge pull request #65 from pah/travis-ci
travis-ci.org: improve config, debug GH_TOKEN issue
2014-07-11 23:55:31 +08:00
Philipp A. Hartmann
33da6610f9 travis-doxygen.sh: temporarily ignore failing GH page update 2014-07-11 13:29:50 +02:00
Philipp A. Hartmann
5050f18743 travis-doxygen.sh: add GH_TOKEN sanity check 2014-07-11 13:20:18 +02:00
Philipp A. Hartmann
33e96f866d .travis.yml: simplify config, prepare for running 32/64 bit configurations 2014-07-11 13:20:18 +02:00
Philipp A. Hartmann
41d211cd51 GenericValue::operator= : fixup assignment operator
While MSVC doesn't like the explicit `.template operator=<...>` syntax
(see 4f40ed6), Clang 3.5 complains about the absence of it:

In file included from ../../test/perftest/rapidjsontest.cpp:6:
../../include/rapidjson/document.h:504:18: error: use 'template' keyword to treat 'operator =' as a dependent template name
                return (*this).operator=<StringRefType>(str);
                               ^
                               template

Delegate both operator=(StringRefType) and operator=(T) to operator(GenericValue&).
2014-07-11 08:27:28 +02:00
Milo Yip
e440b695a1 Merge pull request #62 from pah/fixes/msvc
Fixes and cleanups for MSVC
2014-07-11 07:39:44 +08:00
Philipp A. Hartmann
6d5583628a premake4.lua: only enable "-Wswitch-default" in unittest
There's no need to enforce this flag during the build of the perftest
or the GoogleTest library, as both include third-party code.
2014-07-10 20:49:10 +02:00
Philipp A. Hartmann
ca36a2e66e writer.h: use warning macros for MSVC 2014-07-10 19:49:52 +02:00
Philipp A. Hartmann
7a2e6e79c6 StrLen: align implementations
There are two copies of `StrLen` in the RapidJSON code base
 * strfunc.h: rapidjson::internal::StrLen<Ch>
 * unittest.h: Strlen<Ch>

To hide a warning on MSVC, align both implementations to use
'unsigned/SizeType' as return type and add an explicit cast.
2014-07-10 19:41:17 +02:00
Philipp A. Hartmann
4f40ed64b6 MSVC: fix compiler error in GenericDocument
The `StringRefType` assignment operator overload
leads to a compiler error on MSVC 2005 and later:

..\..\include\rapidjson/document.h(504) : error C2951: template declarations are only permitted at global, namespace, or class scope

Drop the unneeded 'template' keyword here.
2014-07-10 19:41:08 +02:00
Philipp A. Hartmann
3cdfb0dafe rapidjsontest.cpp: silence a warning (C4244) on MSVC 2014-07-10 19:38:57 +02:00
Philipp A. Hartmann
bde95eca04 Writer::WriteUint: add cast to hide warning C4244 on MSVC 2014-07-10 19:38:23 +02:00
Philipp A. Hartmann
04f9c5020f encodings.h: hide narrowing conversion warnings on MSVC 2014-07-10 19:38:23 +02:00
Philipp A. Hartmann
e63125f1a1 MSVC: fix SSE/intrinsic support
MSVC with enabled RAPIDJSON_SSE2/RAPIDJSON_SSE42 requires the explicit
definition of the `_BitScanForward` intrinsic.  This can be reliably
ensured by including "intrin.h" and properly marking '_BitScanForward'
as intrinsic.

Confirmed on MSVC 2005, 2008.
Should fix https://code.google.com/p/rapidjson/issues/detail?id=96
2014-07-10 19:35:47 +02:00
Milo Yip
63d054349a Fixes whitespaces in travis script 2014-07-10 02:25:11 +08:00
Milo Yip
10596ee882 Fixes travis token 2014-07-10 02:19:27 +08:00
Milo Yip
e1431e5836 Change travis token 2014-07-10 01:55:51 +08:00
Milo Yip
59cef2a4f7 Merge pull request #60 from pah/fix/travis-ghtoken
travis-doxygen.sh: avoid leaking the GitHub token in build log
2014-07-10 01:54:51 +08:00
Philipp A. Hartmann
72d0d42a1f travis-doxygen.sh: avoid leaking the GitHub token in build log 2014-07-09 18:24:13 +02:00
Milo Yip
63de910d16 Merge pull request #57 from pah/cleanup/string-handling
Improved handling of (constant) strings
2014-07-09 23:05:00 +08:00
Philipp A. Hartmann
12c5805c7e tutorial.md: update for new string API 2014-07-09 11:26:22 +02:00
Philipp A. Hartmann
58b741ac4b tutorial.md: document GenericValue::Move() 2014-07-09 11:25:55 +02:00
Philipp A. Hartmann
edf8a0aa1d GenericValue: add Move() 2014-07-09 11:25:38 +02:00
Philipp A. Hartmann
9a89eed11a adopt AddMember tests from #47 (726f986,b7bf73c) 2014-07-09 09:24:34 +02:00
Milo Yip
80a1ec309b Merge pull request #58 from pah/doc/travis-doxygen-script
Fixup travis doxygen build script
2014-07-09 14:08:13 +08:00
Philipp A. Hartmann
b3665606a9 fixup travis doxygen build 2014-07-09 08:01:25 +02:00
miloyip
a5b39958ea Adding git config in travis doxygen 2014-07-09 13:21:07 +08:00
Milo Yip
d3cb1866bf Merge pull request #56 from pah/doc/travis-doxygen-script
Travis CI: build/update Doxygen from separate script
2014-07-09 09:17:29 +08:00
Philipp A. Hartmann
9b3969d0e1 GenericValue: fixup bool constructor
With the new string handling API, the constructor taking a `bool`
parameter matches in some unwanted cases, as pointers can be casted
to `bool` implicitly.

Add a SFINAE helper to this constructor to avoid matching arbitrary
pointers.  To avoid confusion for the user, this mechanism is hidden
from the Doxygen documentation.
2014-07-08 20:41:59 +02:00
Philipp A. Hartmann
ed9cdbc2f7 GenericStringRef: disallow assignment, const string pointer 2014-07-08 20:23:47 +02:00
Philipp A. Hartmann
8bbf41f7c7 update string API tests 2014-07-08 20:23:34 +02:00
Philipp A. Hartmann
db8f45573f Doxyfile: expand internal RAPIDJSON_DISABLEIF_RETURN macro 2014-07-08 20:23:34 +02:00
Philipp A. Hartmann
524362242b Add documentation to new string API 2014-07-08 20:23:27 +02:00
Philipp A. Hartmann
7c7eb1c5c0 Travis CI: build/update Doxygen from separate script
In this patch, a script 'build/travis-doxygen.sh' is added to
build and push the Doxygen documentation to the GitHub pages at
https://miloyip.githib.io/rapidjson.

The script exits gracefully, if the build is requested for
 - a branch other than 'master'
 - a pull-request
 - a job (i.e. CI configuration) other than "1"

In case the "secure variables" are not available, only the final upload
is skipped, in order to allow testing of the script's basic functionality.

Update .travis.yml to call the script.
2014-07-08 18:56:07 +02:00
Philipp A. Hartmann
4007301e1f Add a wrapper for constant string references 2014-07-08 16:38:28 +02:00
Philipp A. Hartmann
3bfffa3cf9 meta.h: inherit from TrueType/FalseType where applicable
To reduce repetition and to provide a proper type hierarchy,
let type traits inherit from TrueType and FalseType.
2014-07-08 16:38:28 +02:00
Milo Yip
994fdf8f1e Merge pull request #55 from pah/fixes/pragma-warning
Add RAPIDJSON_DIAG_* macros to handle compiler warnings
2014-07-08 22:21:57 +08:00
Philipp A. Hartmann
6aa601cd51 perftest.h/unittest.h: fix pragma ordering 2014-07-08 15:12:02 +02:00
Philipp A. Hartmann
813da24d72 Add RAPIDJSON_DIAG_* macros to handle compiler warnings
Warning push/pop support has been added to GCC in version 4.6.0,
and pragmas to ignore certain warnings are present since 4.2.0.
This patch hides the compiler-specific warning push/pop/disable
pragmas behind a macro-based implementation (currently for MSVC and
clang /GCC.

This avoids warnings, as seen e.g. on GCC 4.4:
  ../../include/rapidjson/document.h:14: error: expected [error|warning|ignored] after ‘#pragma GCC diagnostic’
and earlier versions complaining about unknown pragmas being ignored.

Note: unittest.h and perftest.h need to check for compilers
explicitly, as rapidjson.h is not included there.
2014-07-08 14:45:19 +02:00
Milo Yip
9ff95ca2cf Minor changes of doc 2014-07-08 14:38:25 +08:00
Milo Yip
3600c6b474 Update table CSS 2014-07-08 14:21:17 +08:00
Milo Yip
62970ee230 Improves documentation style, TOC, fixes links.
Some links will become broken in GitHub.
2014-07-08 14:11:18 +08:00
Milo Yip
400430804d Merge pull request #52 from miloyip/TravisDoxygen
Travis doxygen
2014-07-08 09:41:10 +08:00