Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
yaml-cpp
Commits
0fddd1e5
"...composable_kernel_rocm.git" did not exist on "d4c84256f790d210ea5c952cb18ad13542f6c698"
Commit
0fddd1e5
authored
Oct 02, 2019
by
Andy Maloney
Committed by
Jesse Beder
Oct 02, 2019
Browse files
Modernization: Use "override" when overriding base class methods (#753)
parent
99d95d8e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
40 deletions
+40
-40
include/yaml-cpp/emitfromevents.h
include/yaml-cpp/emitfromevents.h
+12
-12
include/yaml-cpp/exceptions.h
include/yaml-cpp/exceptions.h
+14
-14
src/nodebuilder.h
src/nodebuilder.h
+13
-13
src/setting.h
src/setting.h
+1
-1
No files found.
include/yaml-cpp/emitfromevents.h
View file @
0fddd1e5
...
...
@@ -24,21 +24,21 @@ class EmitFromEvents : public EventHandler {
public:
EmitFromEvents
(
Emitter
&
emitter
);
virtual
void
OnDocumentStart
(
const
Mark
&
mark
);
virtual
void
OnDocumentEnd
();
void
OnDocumentStart
(
const
Mark
&
mark
)
override
;
void
OnDocumentEnd
()
override
;
virtual
void
OnNull
(
const
Mark
&
mark
,
anchor_t
anchor
);
virtual
void
OnAlias
(
const
Mark
&
mark
,
anchor_t
anchor
);
virtual
void
OnScalar
(
const
Mark
&
mark
,
const
std
::
string
&
tag
,
anchor_t
anchor
,
const
std
::
string
&
value
);
void
OnNull
(
const
Mark
&
mark
,
anchor_t
anchor
)
override
;
void
OnAlias
(
const
Mark
&
mark
,
anchor_t
anchor
)
override
;
void
OnScalar
(
const
Mark
&
mark
,
const
std
::
string
&
tag
,
anchor_t
anchor
,
const
std
::
string
&
value
)
override
;
virtual
void
OnSequenceStart
(
const
Mark
&
mark
,
const
std
::
string
&
tag
,
anchor_t
anchor
,
EmitterStyle
::
value
style
);
virtual
void
OnSequenceEnd
();
void
OnSequenceStart
(
const
Mark
&
mark
,
const
std
::
string
&
tag
,
anchor_t
anchor
,
EmitterStyle
::
value
style
)
override
;
void
OnSequenceEnd
()
override
;
virtual
void
OnMapStart
(
const
Mark
&
mark
,
const
std
::
string
&
tag
,
anchor_t
anchor
,
EmitterStyle
::
value
style
);
virtual
void
OnMapEnd
();
void
OnMapStart
(
const
Mark
&
mark
,
const
std
::
string
&
tag
,
anchor_t
anchor
,
EmitterStyle
::
value
style
)
override
;
void
OnMapEnd
()
override
;
private:
void
BeginNode
();
...
...
include/yaml-cpp/exceptions.h
View file @
0fddd1e5
...
...
@@ -149,7 +149,7 @@ class YAML_CPP_API Exception : public std::runtime_error {
public:
Exception
(
const
Mark
&
mark_
,
const
std
::
string
&
msg_
)
:
std
::
runtime_error
(
build_what
(
mark_
,
msg_
)),
mark
(
mark_
),
msg
(
msg_
)
{}
virtual
~
Exception
()
YAML_CPP_NOEXCEPT
;
~
Exception
()
YAML_CPP_NOEXCEPT
override
;
Exception
(
const
Exception
&
)
=
default
;
...
...
@@ -175,7 +175,7 @@ class YAML_CPP_API ParserException : public Exception {
ParserException
(
const
Mark
&
mark_
,
const
std
::
string
&
msg_
)
:
Exception
(
mark_
,
msg_
)
{}
ParserException
(
const
ParserException
&
)
=
default
;
virtual
~
ParserException
()
YAML_CPP_NOEXCEPT
;
~
ParserException
()
YAML_CPP_NOEXCEPT
override
;
};
class
YAML_CPP_API
RepresentationException
:
public
Exception
{
...
...
@@ -183,7 +183,7 @@ class YAML_CPP_API RepresentationException : public Exception {
RepresentationException
(
const
Mark
&
mark_
,
const
std
::
string
&
msg_
)
:
Exception
(
mark_
,
msg_
)
{}
RepresentationException
(
const
RepresentationException
&
)
=
default
;
virtual
~
RepresentationException
()
YAML_CPP_NOEXCEPT
;
~
RepresentationException
()
YAML_CPP_NOEXCEPT
override
;
};
// representation exceptions
...
...
@@ -192,7 +192,7 @@ class YAML_CPP_API InvalidScalar : public RepresentationException {
InvalidScalar
(
const
Mark
&
mark_
)
:
RepresentationException
(
mark_
,
ErrorMsg
::
INVALID_SCALAR
)
{}
InvalidScalar
(
const
InvalidScalar
&
)
=
default
;
virtual
~
InvalidScalar
()
YAML_CPP_NOEXCEPT
;
~
InvalidScalar
()
YAML_CPP_NOEXCEPT
override
;
};
class
YAML_CPP_API
KeyNotFound
:
public
RepresentationException
{
...
...
@@ -202,7 +202,7 @@ class YAML_CPP_API KeyNotFound : public RepresentationException {
:
RepresentationException
(
mark_
,
ErrorMsg
::
KEY_NOT_FOUND_WITH_KEY
(
key_
))
{
}
KeyNotFound
(
const
KeyNotFound
&
)
=
default
;
virtual
~
KeyNotFound
()
YAML_CPP_NOEXCEPT
;
~
KeyNotFound
()
YAML_CPP_NOEXCEPT
override
;
};
template
<
typename
T
>
...
...
@@ -210,7 +210,7 @@ class YAML_CPP_API TypedKeyNotFound : public KeyNotFound {
public:
TypedKeyNotFound
(
const
Mark
&
mark_
,
const
T
&
key_
)
:
KeyNotFound
(
mark_
,
key_
),
key
(
key_
)
{}
virtual
~
TypedKeyNotFound
()
YAML_CPP_NOEXCEPT
=
default
;
~
TypedKeyNotFound
()
YAML_CPP_NOEXCEPT
override
=
default
;
T
key
;
};
...
...
@@ -227,7 +227,7 @@ class YAML_CPP_API InvalidNode : public RepresentationException {
:
RepresentationException
(
Mark
::
null_mark
(),
ErrorMsg
::
INVALID_NODE_WITH_KEY
(
key
))
{}
InvalidNode
(
const
InvalidNode
&
)
=
default
;
virtual
~
InvalidNode
()
YAML_CPP_NOEXCEPT
;
~
InvalidNode
()
YAML_CPP_NOEXCEPT
override
;
};
class
YAML_CPP_API
BadConversion
:
public
RepresentationException
{
...
...
@@ -235,7 +235,7 @@ class YAML_CPP_API BadConversion : public RepresentationException {
explicit
BadConversion
(
const
Mark
&
mark_
)
:
RepresentationException
(
mark_
,
ErrorMsg
::
BAD_CONVERSION
)
{}
BadConversion
(
const
BadConversion
&
)
=
default
;
virtual
~
BadConversion
()
YAML_CPP_NOEXCEPT
;
~
BadConversion
()
YAML_CPP_NOEXCEPT
override
;
};
template
<
typename
T
>
...
...
@@ -249,7 +249,7 @@ class YAML_CPP_API BadDereference : public RepresentationException {
BadDereference
()
:
RepresentationException
(
Mark
::
null_mark
(),
ErrorMsg
::
BAD_DEREFERENCE
)
{}
BadDereference
(
const
BadDereference
&
)
=
default
;
virtual
~
BadDereference
()
YAML_CPP_NOEXCEPT
;
~
BadDereference
()
YAML_CPP_NOEXCEPT
override
;
};
class
YAML_CPP_API
BadSubscript
:
public
RepresentationException
{
...
...
@@ -259,7 +259,7 @@ class YAML_CPP_API BadSubscript : public RepresentationException {
:
RepresentationException
(
Mark
::
null_mark
(),
ErrorMsg
::
BAD_SUBSCRIPT_WITH_KEY
(
key
))
{}
BadSubscript
(
const
BadSubscript
&
)
=
default
;
virtual
~
BadSubscript
()
YAML_CPP_NOEXCEPT
;
~
BadSubscript
()
YAML_CPP_NOEXCEPT
override
;
};
class
YAML_CPP_API
BadPushback
:
public
RepresentationException
{
...
...
@@ -267,7 +267,7 @@ class YAML_CPP_API BadPushback : public RepresentationException {
BadPushback
()
:
RepresentationException
(
Mark
::
null_mark
(),
ErrorMsg
::
BAD_PUSHBACK
)
{}
BadPushback
(
const
BadPushback
&
)
=
default
;
virtual
~
BadPushback
()
YAML_CPP_NOEXCEPT
;
~
BadPushback
()
YAML_CPP_NOEXCEPT
override
;
};
class
YAML_CPP_API
BadInsert
:
public
RepresentationException
{
...
...
@@ -275,7 +275,7 @@ class YAML_CPP_API BadInsert : public RepresentationException {
BadInsert
()
:
RepresentationException
(
Mark
::
null_mark
(),
ErrorMsg
::
BAD_INSERT
)
{}
BadInsert
(
const
BadInsert
&
)
=
default
;
virtual
~
BadInsert
()
YAML_CPP_NOEXCEPT
;
~
BadInsert
()
YAML_CPP_NOEXCEPT
override
;
};
class
YAML_CPP_API
EmitterException
:
public
Exception
{
...
...
@@ -283,14 +283,14 @@ class YAML_CPP_API EmitterException : public Exception {
EmitterException
(
const
std
::
string
&
msg_
)
:
Exception
(
Mark
::
null_mark
(),
msg_
)
{}
EmitterException
(
const
EmitterException
&
)
=
default
;
virtual
~
EmitterException
()
YAML_CPP_NOEXCEPT
;
~
EmitterException
()
YAML_CPP_NOEXCEPT
override
;
};
class
YAML_CPP_API
BadFile
:
public
Exception
{
public:
BadFile
()
:
Exception
(
Mark
::
null_mark
(),
ErrorMsg
::
BAD_FILE
)
{}
BadFile
(
const
BadFile
&
)
=
default
;
virtual
~
BadFile
()
YAML_CPP_NOEXCEPT
;
~
BadFile
()
YAML_CPP_NOEXCEPT
override
;
};
}
...
...
src/nodebuilder.h
View file @
0fddd1e5
...
...
@@ -31,25 +31,25 @@ class NodeBuilder : public EventHandler {
NodeBuilder
(
NodeBuilder
&&
)
=
delete
;
NodeBuilder
&
operator
=
(
const
NodeBuilder
&
)
=
delete
;
NodeBuilder
&
operator
=
(
NodeBuilder
&&
)
=
delete
;
virtual
~
NodeBuilder
();
~
NodeBuilder
()
override
;
Node
Root
();
virtual
void
OnDocumentStart
(
const
Mark
&
mark
);
virtual
void
OnDocumentEnd
();
void
OnDocumentStart
(
const
Mark
&
mark
)
override
;
void
OnDocumentEnd
()
override
;
virtual
void
OnNull
(
const
Mark
&
mark
,
anchor_t
anchor
);
virtual
void
OnAlias
(
const
Mark
&
mark
,
anchor_t
anchor
);
virtual
void
OnScalar
(
const
Mark
&
mark
,
const
std
::
string
&
tag
,
anchor_t
anchor
,
const
std
::
string
&
value
);
void
OnNull
(
const
Mark
&
mark
,
anchor_t
anchor
)
override
;
void
OnAlias
(
const
Mark
&
mark
,
anchor_t
anchor
)
override
;
void
OnScalar
(
const
Mark
&
mark
,
const
std
::
string
&
tag
,
anchor_t
anchor
,
const
std
::
string
&
value
)
override
;
virtual
void
OnSequenceStart
(
const
Mark
&
mark
,
const
std
::
string
&
tag
,
anchor_t
anchor
,
EmitterStyle
::
value
style
);
virtual
void
OnSequenceEnd
();
void
OnSequenceStart
(
const
Mark
&
mark
,
const
std
::
string
&
tag
,
anchor_t
anchor
,
EmitterStyle
::
value
style
)
override
;
void
OnSequenceEnd
()
override
;
virtual
void
OnMapStart
(
const
Mark
&
mark
,
const
std
::
string
&
tag
,
anchor_t
anchor
,
EmitterStyle
::
value
style
);
virtual
void
OnMapEnd
();
void
OnMapStart
(
const
Mark
&
mark
,
const
std
::
string
&
tag
,
anchor_t
anchor
,
EmitterStyle
::
value
style
)
override
;
void
OnMapEnd
()
override
;
private:
detail
::
node
&
Push
(
const
Mark
&
mark
,
anchor_t
anchor
);
...
...
src/setting.h
View file @
0fddd1e5
...
...
@@ -46,7 +46,7 @@ class SettingChange : public SettingChangeBase {
SettingChange
&
operator
=
(
const
SettingChange
&
)
=
delete
;
SettingChange
&
operator
=
(
SettingChange
&&
)
=
delete
;
virtual
void
pop
()
{
m_pCurSetting
->
restore
(
m_oldSetting
);
}
void
pop
()
override
{
m_pCurSetting
->
restore
(
m_oldSetting
);
}
private:
Setting
<
T
>*
m_pCurSetting
;
...
...
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