Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Corryvreckan
Corryvreckan
Commits
3f28757a
Commit
3f28757a
authored
Feb 21, 2019
by
Simon Spannagel
Browse files
Clipboard: reset event to nullptr at the end of processing
parent
cb6d311f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/core/clipboard/Clipboard.cpp
View file @
3f28757a
...
...
@@ -38,7 +38,7 @@ bool Clipboard::event_defined() {
void
Clipboard
::
put_event
(
std
::
shared_ptr
<
Event
>
event
)
{
// Already defined:
if
(
m_event
)
{
throw
InvalidDataError
(
"
e
vent already defined"
);
throw
InvalidDataError
(
"
E
vent already defined
. Only one module can place an event definition
"
);
}
else
{
m_event
=
event
;
}
...
...
@@ -46,7 +46,7 @@ void Clipboard::put_event(std::shared_ptr<Event> event) {
std
::
shared_ptr
<
Event
>
Clipboard
::
get_event
()
{
if
(
!
m_event
)
{
throw
Missing
DataError
(
"event"
);
throw
Invalid
DataError
(
"
Event not defined. Add Metronome module or Event reader defining the
event"
);
}
return
m_event
;
}
...
...
@@ -64,6 +64,9 @@ void Clipboard::clear() {
delete
collection
;
set
=
m_data
.
erase
(
set
);
}
// Resetting the event definition:
m_event
.
reset
();
}
std
::
vector
<
std
::
string
>
Clipboard
::
listCollections
()
{
...
...
Write
Preview
Supports
Markdown
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