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
a7490404
Commit
a7490404
authored
Jan 23, 2016
by
Milo Yip
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Try to fix a clang missing assignment warning
parent
d8c793f2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
serialize.cpp
example/serialize/serialize.cpp
+13
-0
No files found.
example/serialize/serialize.cpp
View file @
a7490404
...
@@ -14,6 +14,12 @@ public:
...
@@ -14,6 +14,12 @@ public:
Person
(
const
Person
&
rhs
)
:
name_
(
rhs
.
name_
),
age_
(
rhs
.
age_
)
{}
Person
(
const
Person
&
rhs
)
:
name_
(
rhs
.
name_
),
age_
(
rhs
.
age_
)
{}
virtual
~
Person
();
virtual
~
Person
();
Person
&
operator
=
(
const
Person
&
rhs
)
{
name_
=
rhs
.
name_
;
age_
=
rhs
.
age_
;
return
*
this
;
}
protected
:
protected
:
template
<
typename
Writer
>
template
<
typename
Writer
>
void
Serialize
(
Writer
&
writer
)
const
{
void
Serialize
(
Writer
&
writer
)
const
{
...
@@ -107,6 +113,13 @@ public:
...
@@ -107,6 +113,13 @@ public:
Employee
(
const
Employee
&
rhs
)
:
Person
(
rhs
),
dependents_
(
rhs
.
dependents_
),
married_
(
rhs
.
married_
)
{}
Employee
(
const
Employee
&
rhs
)
:
Person
(
rhs
),
dependents_
(
rhs
.
dependents_
),
married_
(
rhs
.
married_
)
{}
virtual
~
Employee
();
virtual
~
Employee
();
Employee
&
operator
=
(
const
Employee
&
rhs
)
{
static_cast
<
Person
&>
(
*
this
)
=
rhs
;
dependents_
=
rhs
.
dependents_
;
married_
=
rhs
.
married_
;
return
*
this
;
}
void
AddDependent
(
const
Dependent
&
dependent
)
{
void
AddDependent
(
const
Dependent
&
dependent
)
{
dependents_
.
push_back
(
dependent
);
dependents_
.
push_back
(
dependent
);
}
}
...
...
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