Skip to content
Snippets Groups Projects
Commit 01a47925 authored by Jan Trávníček's avatar Jan Trávníček
Browse files

speedup constructing label pairs and label sets

parent 4da32582
No related branches found
No related tags found
No related merge requests found
......@@ -11,7 +11,11 @@
 
namespace label {
 
LabelPairLabel::LabelPairLabel(std::pair<Label, Label> label) : label(label) {
LabelPairLabel::LabelPairLabel(const std::pair<Label, Label>& label) : label(std::move(label)) {
}
LabelPairLabel::LabelPairLabel(std::pair<Label, Label>&& label) : label(std::move(label)) {
 
}
 
......
......@@ -32,7 +32,8 @@ public:
* Creates new symbol with given name.
* @param symbol name of the symbol
*/
explicit LabelPairLabel(std::pair<Label, Label> label);
explicit LabelPairLabel(const std::pair<Label, Label>& label);
explicit LabelPairLabel(std::pair<Label, Label>&& label);
 
virtual bool operator<(const alib::ObjectBase& other) const;
 
......
......@@ -11,7 +11,11 @@
 
namespace label {
 
LabelSetLabel::LabelSetLabel(std::set<Label> label) : label(label) {
LabelSetLabel::LabelSetLabel(const std::set<Label>& label) : label(label) {
}
LabelSetLabel::LabelSetLabel(std::set<Label>&& label) : label(std::move(label)) {
 
}
 
......
......@@ -32,7 +32,8 @@ public:
* Creates new symbol with given name.
* @param symbol name of the symbol
*/
explicit LabelSetLabel(std::set<Label> label);
explicit LabelSetLabel(const std::set<Label>& label);
explicit LabelSetLabel(std::set<Label>&& label);
 
virtual bool operator<(const alib::ObjectBase& other) const;
 
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment