Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
json
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
json
Commits
4cc4b26d
Commit
4cc4b26d
authored
Feb 10, 2016
by
Niels
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
try to replace ssize_t occurrences with std::ptrdiff_t (for #204)
parent
1cc47175
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
32 deletions
+6
-32
src/json.hpp
src/json.hpp
+3
-16
src/json.hpp.re2c
src/json.hpp.re2c
+3
-16
No files found.
src/json.hpp
View file @
4cc4b26d
...
...
@@ -34,25 +34,12 @@ Licensed under the MIT License <http://opensource.org/licenses/MIT>.
#include <utility>
#include <vector>
// enable ssize_t on MinGW
#ifdef __GNUC__
#ifdef __MINGW32__
#include <sys/types.h>
#endif
#endif
// disable float-equal warnings on GCC/clang
#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wfloat-equal"
#endif
// enable ssize_t for MSVC
#ifdef _MSC_VER
#include <basetsd.h>
using
ssize_t
=
SSIZE_T
;
#endif
/*!
@brief namespace for Niels Lohmann
@see https://github.com/nlohmann
...
...
@@ -7983,9 +7970,9 @@ basic_json_parser_63:
return
;
}
const
s
size
_t
offset_start
=
m_start
-
m_content
;
const
s
size
_t
offset_marker
=
m_marker
-
m_start
;
const
s
size
_t
offset_cursor
=
m_cursor
-
m_start
;
const
s
td
::
ptrdiff
_t
offset_start
=
m_start
-
m_content
;
const
s
td
::
ptrdiff
_t
offset_marker
=
m_marker
-
m_start
;
const
s
td
::
ptrdiff
_t
offset_cursor
=
m_cursor
-
m_start
;
m_buffer
.
erase
(
0
,
static_cast
<
size_t
>
(
offset_start
));
std
::
string
line
;
...
...
src/json.hpp.re2c
View file @
4cc4b26d
...
...
@@ -34,25 +34,12 @@ Licensed under the MIT License <http://opensource.org/licenses/MIT>.
#include <utility>
#include <vector>
// enable ssize_t on MinGW
#ifdef __GNUC__
#ifdef __MINGW32__
#include <sys/types.h>
#endif
#endif
// disable float-equal warnings on GCC/clang
#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wfloat-equal"
#endif
// enable ssize_t for MSVC
#ifdef _MSC_VER
#include <basetsd.h>
using ssize_t = SSIZE_T;
#endif
/*!
@brief namespace for Niels Lohmann
@see https://github.com/nlohmann
...
...
@@ -7293,9 +7280,9 @@ class basic_json
return;
}
const s
size
_t offset_start = m_start - m_content;
const s
size
_t offset_marker = m_marker - m_start;
const s
size
_t offset_cursor = m_cursor - m_start;
const s
td::ptrdiff
_t offset_start = m_start - m_content;
const s
td::ptrdiff
_t offset_marker = m_marker - m_start;
const s
td::ptrdiff
_t offset_cursor = m_cursor - m_start;
m_buffer.erase(0, static_cast<size_t>(offset_start));
std::string line;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment