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
d300a8e2
Unverified
Commit
d300a8e2
authored
Oct 13, 2017
by
Niels Lohmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🚨
fixed warnings #776
parent
0c0851db
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
src/json.hpp
src/json.hpp
+18
-18
No files found.
src/json.hpp
View file @
d300a8e2
...
...
@@ -206,9 +206,9 @@ class exception : public std::exception
protected:
exception
(
int
id_
,
const
char
*
what_arg
)
:
id
(
id_
),
m
(
what_arg
)
{}
static
std
::
string
name
(
const
std
::
string
&
ename
,
int
id
)
static
std
::
string
name
(
const
std
::
string
&
ename
,
int
id
_
)
{
return
"[json.exception."
+
ename
+
"."
+
std
::
to_string
(
id
)
+
"] "
;
return
"[json.exception."
+
ename
+
"."
+
std
::
to_string
(
id
_
)
+
"] "
;
}
private:
...
...
@@ -264,18 +264,18 @@ class parse_error : public exception
public:
/*!
@brief create a parse error exception
@param[in] id
the id of the exception
@param[in] id
_
the id of the exception
@param[in] byte_ the byte index where the error occurred (or 0 if the
position cannot be determined)
@param[in] what_arg the explanatory string
@return parse_error object
*/
static
parse_error
create
(
int
id
,
std
::
size_t
byte_
,
const
std
::
string
&
what_arg
)
static
parse_error
create
(
int
id
_
,
std
::
size_t
byte_
,
const
std
::
string
&
what_arg
)
{
std
::
string
w
=
exception
::
name
(
"parse_error"
,
id
)
+
"parse error"
+
std
::
string
w
=
exception
::
name
(
"parse_error"
,
id
_
)
+
"parse error"
+
(
byte_
!=
0
?
(
" at "
+
std
::
to_string
(
byte_
))
:
""
)
+
": "
+
what_arg
;
return
parse_error
(
id
,
byte_
,
w
.
c_str
());
return
parse_error
(
id
_
,
byte_
,
w
.
c_str
());
}
/*!
...
...
@@ -334,10 +334,10 @@ caught.,invalid_iterator}
class
invalid_iterator
:
public
exception
{
public:
static
invalid_iterator
create
(
int
id
,
const
std
::
string
&
what_arg
)
static
invalid_iterator
create
(
int
id
_
,
const
std
::
string
&
what_arg
)
{
std
::
string
w
=
exception
::
name
(
"invalid_iterator"
,
id
)
+
what_arg
;
return
invalid_iterator
(
id
,
w
.
c_str
());
std
::
string
w
=
exception
::
name
(
"invalid_iterator"
,
id
_
)
+
what_arg
;
return
invalid_iterator
(
id
_
,
w
.
c_str
());
}
private:
...
...
@@ -385,10 +385,10 @@ caught.,type_error}
class
type_error
:
public
exception
{
public:
static
type_error
create
(
int
id
,
const
std
::
string
&
what_arg
)
static
type_error
create
(
int
id
_
,
const
std
::
string
&
what_arg
)
{
std
::
string
w
=
exception
::
name
(
"type_error"
,
id
)
+
what_arg
;
return
type_error
(
id
,
w
.
c_str
());
std
::
string
w
=
exception
::
name
(
"type_error"
,
id
_
)
+
what_arg
;
return
type_error
(
id
_
,
w
.
c_str
());
}
private:
...
...
@@ -428,10 +428,10 @@ caught.,out_of_range}
class
out_of_range
:
public
exception
{
public:
static
out_of_range
create
(
int
id
,
const
std
::
string
&
what_arg
)
static
out_of_range
create
(
int
id
_
,
const
std
::
string
&
what_arg
)
{
std
::
string
w
=
exception
::
name
(
"out_of_range"
,
id
)
+
what_arg
;
return
out_of_range
(
id
,
w
.
c_str
());
std
::
string
w
=
exception
::
name
(
"out_of_range"
,
id
_
)
+
what_arg
;
return
out_of_range
(
id
_
,
w
.
c_str
());
}
private:
...
...
@@ -466,10 +466,10 @@ caught.,other_error}
class
other_error
:
public
exception
{
public:
static
other_error
create
(
int
id
,
const
std
::
string
&
what_arg
)
static
other_error
create
(
int
id
_
,
const
std
::
string
&
what_arg
)
{
std
::
string
w
=
exception
::
name
(
"other_error"
,
id
)
+
what_arg
;
return
other_error
(
id
,
w
.
c_str
());
std
::
string
w
=
exception
::
name
(
"other_error"
,
id
_
)
+
what_arg
;
return
other_error
(
id
_
,
w
.
c_str
());
}
private:
...
...
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