Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
R
rapidjson
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
rapidjson
Commits
e2cd486e
Commit
e2cd486e
authored
Jul 04, 2014
by
Milo Yip
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes -Wswitch-default warnings
parent
469333af
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
3 deletions
+14
-3
premake4.lua
build/premake4.lua
+2
-2
document.h
include/rapidjson/document.h
+6
-0
encodedstream.h
include/rapidjson/encodedstream.h
+6
-1
No files found.
build/premake4.lua
View file @
e2cd486e
...
...
@@ -64,7 +64,7 @@ solution "test"
defines
{
"_CRT_SECURE_NO_WARNINGS"
}
configuration
"gmake"
buildoptions
"-msse4.2 -Werror -Wall -Wextra"
buildoptions
"-msse4.2 -Werror -Wall -Wextra
-Wswitch-default
"
project
"gtest"
kind
"StaticLib"
...
...
@@ -154,7 +154,7 @@ solution "example"
defines
{
"_CRT_SECURE_NO_WARNINGS"
}
configuration
"gmake"
buildoptions
"-Werror -Wall -Wextra -Weffc++"
buildoptions
"-Werror -Wall -Wextra -Weffc++
-Wswitch-default
"
project
"condense"
kind
"ConsoleApp"
...
...
include/rapidjson/document.h
View file @
e2cd486e
...
...
@@ -319,6 +319,9 @@ public:
case
kCopyStringFlag
:
Allocator
::
Free
(
const_cast
<
Ch
*>
(
data_
.
s
.
str
));
break
;
default
:
break
;
// Do nothing for other types.
}
}
}
...
...
@@ -794,6 +797,9 @@ int z = a[0u].GetInt(); // This works too.
else
if
(
IsUint64
())
handler
.
Uint64
(
data_
.
n
.
u64
);
else
handler
.
Double
(
data_
.
n
.
d
);
break
;
default
:
RAPIDJSON_ASSERT
(
false
);
}
return
*
this
;
}
...
...
include/rapidjson/encodedstream.h
View file @
e2cd486e
...
...
@@ -158,10 +158,11 @@ private:
case
0x01
:
type_
=
kUTF32LE
;
break
;
case
0x05
:
type_
=
kUTF16LE
;
break
;
case
0x0F
:
type_
=
kUTF8
;
break
;
default:
break
;
// Use type defined by user.
}
}
// R
U
ntime check whether the size of character type is sufficient. It only perform checks with assertion.
// R
u
ntime check whether the size of character type is sufficient. It only perform checks with assertion.
switch
(
type_
)
{
case
kUTF8
:
// Do nothing
...
...
@@ -174,6 +175,8 @@ private:
case
kUTF32BE
:
RAPIDJSON_ASSERT
(
sizeof
(
Ch
)
>=
4
);
break
;
default:
RAPIDJSON_ASSERT
(
false
);
// Invalid type
}
}
...
...
@@ -216,6 +219,8 @@ public:
case
kUTF8
:
// Do nothing
break
;
default
:
RAPIDJSON_ASSERT
(
false
);
// Invalid UTFType
}
static
const
PutFunc
f
[]
=
{
RAPIDJSON_ENCODINGS_FUNC
(
Put
)
};
...
...
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