From 015956e6cbe8e5b4b6248e2bbb664148e0adb6a8 Mon Sep 17 00:00:00 2001
From: Jan Travnicek <Jan.Travnicek@fit.cvut.cz>
Date: Fri, 5 Aug 2016 21:33:26 +0200
Subject: [PATCH] remove move causing unspecified behaviour

---
 alib2data/src/tree/ranked/PrefixRankedNonlinearPattern.cpp | 5 ++---
 alib2data/src/tree/ranked/PrefixRankedPattern.cpp          | 2 +-
 alib2data/src/tree/ranked/PrefixRankedTree.cpp             | 2 +-
 alib2data/src/tree/unranked/PrefixBarTree.cpp              | 2 +-
 4 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/alib2data/src/tree/ranked/PrefixRankedNonlinearPattern.cpp b/alib2data/src/tree/ranked/PrefixRankedNonlinearPattern.cpp
index c1478cd47d..63510eb310 100644
--- a/alib2data/src/tree/ranked/PrefixRankedNonlinearPattern.cpp
+++ b/alib2data/src/tree/ranked/PrefixRankedNonlinearPattern.cpp
@@ -34,11 +34,10 @@ PrefixRankedNonlinearPattern::PrefixRankedNonlinearPattern ( alphabet::RankedSym
 	setContent ( std::move ( data ) );
 }
 
-PrefixRankedNonlinearPattern::PrefixRankedNonlinearPattern ( alphabet::RankedSymbol subtreeWildcard, std::set < alphabet::RankedSymbol > nonlinearVariables, std::vector < alphabet::RankedSymbol > data ) : PrefixRankedNonlinearPattern ( std::move ( subtreeWildcard ), std::move ( nonlinearVariables ), std::set < alphabet::RankedSymbol > ( data.begin ( ), data.end ( ) ) + std::set < alphabet::RankedSymbol > { subtreeWildcard } + nonlinearVariables, std::move ( data ) ) {
+PrefixRankedNonlinearPattern::PrefixRankedNonlinearPattern ( alphabet::RankedSymbol subtreeWildcard, std::set < alphabet::RankedSymbol > nonlinearVariables, std::vector < alphabet::RankedSymbol > data ) : PrefixRankedNonlinearPattern ( subtreeWildcard, nonlinearVariables, std::set < alphabet::RankedSymbol > ( data.begin ( ), data.end ( ) ) + std::set < alphabet::RankedSymbol > { subtreeWildcard } + nonlinearVariables, data ) {
 }
 
-PrefixRankedNonlinearPattern::PrefixRankedNonlinearPattern ( alphabet::RankedSymbol subtreeWildcard, std::vector < alphabet::RankedSymbol > data ) : PrefixRankedNonlinearPattern ( std::move ( subtreeWildcard ), {
-	}, std::set < alphabet::RankedSymbol > ( data.begin ( ), data.end ( ) ) + std::set < alphabet::RankedSymbol > { subtreeWildcard }, std::move ( data ) ) {
+PrefixRankedNonlinearPattern::PrefixRankedNonlinearPattern ( alphabet::RankedSymbol subtreeWildcard, std::vector < alphabet::RankedSymbol > data ) : PrefixRankedNonlinearPattern ( subtreeWildcard, {}, std::set < alphabet::RankedSymbol > ( data.begin ( ), data.end ( ) ) + std::set < alphabet::RankedSymbol > { subtreeWildcard }, data ) {
 }
 
 PrefixRankedNonlinearPattern::PrefixRankedNonlinearPattern ( const PrefixRankedTree & tree ) : PrefixRankedNonlinearPattern ( alphabet::SubtreeWildcardSymbol::RANKED_SUBTREE_WILDCARD_SYMBOL, {
diff --git a/alib2data/src/tree/ranked/PrefixRankedPattern.cpp b/alib2data/src/tree/ranked/PrefixRankedPattern.cpp
index 043de48677..9a8cbb330f 100644
--- a/alib2data/src/tree/ranked/PrefixRankedPattern.cpp
+++ b/alib2data/src/tree/ranked/PrefixRankedPattern.cpp
@@ -31,7 +31,7 @@ PrefixRankedPattern::PrefixRankedPattern ( alphabet::RankedSymbol subtreeWildcar
 	setContent ( std::move ( data ) );
 }
 
-PrefixRankedPattern::PrefixRankedPattern ( alphabet::RankedSymbol subtreeWildcard, std::vector < alphabet::RankedSymbol > data ) : PrefixRankedPattern ( std::move ( subtreeWildcard ), std::set < alphabet::RankedSymbol > ( data.begin ( ), data.end ( ) ) + std::set < alphabet::RankedSymbol > { subtreeWildcard }, std::move ( data ) ) {
+PrefixRankedPattern::PrefixRankedPattern ( alphabet::RankedSymbol subtreeWildcard, std::vector < alphabet::RankedSymbol > data ) : PrefixRankedPattern ( subtreeWildcard, std::set < alphabet::RankedSymbol > ( data.begin ( ), data.end ( ) ) + std::set < alphabet::RankedSymbol > { subtreeWildcard }, data ) {
 }
 
 PrefixRankedPattern::PrefixRankedPattern ( const PrefixRankedTree & tree ) : PrefixRankedPattern ( alphabet::SubtreeWildcardSymbol::RANKED_SUBTREE_WILDCARD_SYMBOL, tree.getAlphabet ( ) + std::set < alphabet::RankedSymbol > { alphabet::SubtreeWildcardSymbol::RANKED_SUBTREE_WILDCARD_SYMBOL }, tree.getContent ( ) ) {
diff --git a/alib2data/src/tree/ranked/PrefixRankedTree.cpp b/alib2data/src/tree/ranked/PrefixRankedTree.cpp
index 0867389e31..6b5c225b3f 100644
--- a/alib2data/src/tree/ranked/PrefixRankedTree.cpp
+++ b/alib2data/src/tree/ranked/PrefixRankedTree.cpp
@@ -28,7 +28,7 @@ PrefixRankedTree::PrefixRankedTree ( std::set < alphabet::RankedSymbol > alphabe
 	setContent ( std::move ( data ) );
 }
 
-PrefixRankedTree::PrefixRankedTree ( std::vector < alphabet::RankedSymbol > data ) : PrefixRankedTree ( std::set < alphabet::RankedSymbol > ( data.begin ( ), data.end ( ) ), std::move ( data ) ) {
+PrefixRankedTree::PrefixRankedTree ( std::vector < alphabet::RankedSymbol > data ) : PrefixRankedTree ( std::set < alphabet::RankedSymbol > ( data.begin ( ), data.end ( ) ), data ) {
 }
 
 PrefixRankedTree::PrefixRankedTree ( const RankedTree & tree ) : PrefixRankedTree ( tree.getAlphabet ( ), toPrefixRanked ( tree.getRoot ( ) ) ) {
diff --git a/alib2data/src/tree/unranked/PrefixBarTree.cpp b/alib2data/src/tree/unranked/PrefixBarTree.cpp
index c2bc2d8185..8d9839e831 100644
--- a/alib2data/src/tree/unranked/PrefixBarTree.cpp
+++ b/alib2data/src/tree/unranked/PrefixBarTree.cpp
@@ -31,7 +31,7 @@ PrefixBarTree::PrefixBarTree ( alphabet::Symbol bar, std::set < alphabet::Symbol
 	setContent ( std::move ( data ) );
 }
 
-PrefixBarTree::PrefixBarTree ( alphabet::Symbol bar, std::vector < alphabet::Symbol > data ) : PrefixBarTree ( std::move ( bar ), std::set < alphabet::Symbol > ( data.begin ( ), data.end ( ) ) + std::set < alphabet::Symbol > { bar }, std::move ( data ) ) {
+PrefixBarTree::PrefixBarTree ( alphabet::Symbol bar, std::vector < alphabet::Symbol > data ) : PrefixBarTree ( bar, std::set < alphabet::Symbol > ( data.begin ( ), data.end ( ) ) + std::set < alphabet::Symbol > { bar }, data ) {
 }
 
 PrefixBarTree::PrefixBarTree ( alphabet::Symbol bar, const UnrankedTree & tree ) : PrefixBarTree ( bar, tree.getAlphabet ( ) + std::set < alphabet::Symbol > { bar }, toPrefixBar ( tree.getRoot ( ), bar ) ) {
-- 
GitLab