diff --git a/alib2data/src/graph/common/Node.cpp b/alib2data/src/graph/common/Node.cpp index c95656d79ec8f044de3725ce2710e4599e9d374b..aad83a77b63d6a630b0488f9800a792d150cbb54 100644 --- a/alib2data/src/graph/common/Node.cpp +++ b/alib2data/src/graph/common/Node.cpp @@ -55,7 +55,7 @@ Node &Node::operator=(const Node &other) return *this; } -Node &Node::operator=(Node &&other) +Node &Node::operator=(Node &&other) noexcept { std::swap(name, other.name); return *this; diff --git a/alib2data/src/graph/common/Node.h b/alib2data/src/graph/common/Node.h index 3016a938fa4679334262ea1a1d7fbde9cce8b2ce..cc52dc5f475f01c139549ad6b236ceeffdc00423 100644 --- a/alib2data/src/graph/common/Node.h +++ b/alib2data/src/graph/common/Node.h @@ -20,7 +20,7 @@ public: Node(const Node &other); Node(Node &&other) noexcept; Node &operator=(const Node &other); - Node &operator=(Node &&other); + Node &operator=(Node &&other) noexcept; GraphElement *clone() const; GraphElement *plunder() &&; diff --git a/alib2data/src/graph/directed/DirectedEdge.cpp b/alib2data/src/graph/directed/DirectedEdge.cpp index a05cbce7b739a837637dacfc3ced9509e370c252..67eb6039abf93447281985e7c404bdac379b6c76 100644 --- a/alib2data/src/graph/directed/DirectedEdge.cpp +++ b/alib2data/src/graph/directed/DirectedEdge.cpp @@ -103,7 +103,7 @@ DirectedEdge &DirectedEdge::operator=(const DirectedEdge &other) return *this; } -DirectedEdge &DirectedEdge::operator=(DirectedEdge &&other) +DirectedEdge &DirectedEdge::operator=(DirectedEdge &&other) noexcept { std::swap(from, other.from); std::swap(to, other.to); diff --git a/alib2data/src/graph/directed/DirectedEdge.h b/alib2data/src/graph/directed/DirectedEdge.h index 75b1a346023293d4af09c6d9d66756aeccf9b7dd..fecb0a71f77032e0969ffe17eae0ea7886c9e86d 100644 --- a/alib2data/src/graph/directed/DirectedEdge.h +++ b/alib2data/src/graph/directed/DirectedEdge.h @@ -25,7 +25,7 @@ public: DirectedEdge(const DirectedEdge &other); DirectedEdge(DirectedEdge &&other) noexcept; DirectedEdge &operator=(const DirectedEdge &other); - DirectedEdge &operator=(DirectedEdge &&other); + DirectedEdge &operator=(DirectedEdge &&other) noexcept; GraphElement *clone() const; GraphElement *plunder() &&; diff --git a/alib2data/src/graph/undirected/UndirectedEdge.cpp b/alib2data/src/graph/undirected/UndirectedEdge.cpp index 79327f8dd22c76d1805e45f482a8006f28f4886a..ac1985327308c4c77e0b2664ab88c353985c690e 100644 --- a/alib2data/src/graph/undirected/UndirectedEdge.cpp +++ b/alib2data/src/graph/undirected/UndirectedEdge.cpp @@ -103,7 +103,7 @@ UndirectedEdge &UndirectedEdge::operator=(const UndirectedEdge &other) return *this; } -UndirectedEdge &UndirectedEdge::operator=(UndirectedEdge &&other) +UndirectedEdge &UndirectedEdge::operator=(UndirectedEdge &&other) noexcept { std::swap(first, other.first); std::swap(second, other.second); diff --git a/alib2data/src/graph/undirected/UndirectedEdge.h b/alib2data/src/graph/undirected/UndirectedEdge.h index b8c1b846ab1c178577b53fbb163a61b09756e055..e0757e632774bef50b817977f6e2f2b646417911 100644 --- a/alib2data/src/graph/undirected/UndirectedEdge.h +++ b/alib2data/src/graph/undirected/UndirectedEdge.h @@ -25,7 +25,7 @@ public: UndirectedEdge(const UndirectedEdge &other); UndirectedEdge(UndirectedEdge &&other) noexcept; UndirectedEdge &operator=(const UndirectedEdge &other); - UndirectedEdge &operator=(UndirectedEdge &&other); + UndirectedEdge &operator=(UndirectedEdge &&other) noexcept; GraphElement *clone() const; GraphElement *plunder() &&; diff --git a/alib2data/src/regexp/formal/FormalRegExpAlternation.cpp b/alib2data/src/regexp/formal/FormalRegExpAlternation.cpp index 622910ba0a4755857346ef1fb9d8e1a6132c6558..1a8b8588e351c8d4cb723d100d4ffdd7de2a8dd6 100644 --- a/alib2data/src/regexp/formal/FormalRegExpAlternation.cpp +++ b/alib2data/src/regexp/formal/FormalRegExpAlternation.cpp @@ -43,7 +43,7 @@ FormalRegExpAlternation& FormalRegExpAlternation::operator=(const FormalRegExpAl return *this; } -FormalRegExpAlternation& FormalRegExpAlternation::operator=(FormalRegExpAlternation&& other) { +FormalRegExpAlternation& FormalRegExpAlternation::operator=(FormalRegExpAlternation&& other) noexcept { std::swap(this->left, other.left); std::swap(this->right, other.right); diff --git a/alib2data/src/regexp/formal/FormalRegExpAlternation.h b/alib2data/src/regexp/formal/FormalRegExpAlternation.h index d2a90b6ecb3ec856afe6dff52cb3d1ae8ac3ab15..2d6e1d20d5261dbbe9d7f4e7b618f819b3c4ebf5 100644 --- a/alib2data/src/regexp/formal/FormalRegExpAlternation.h +++ b/alib2data/src/regexp/formal/FormalRegExpAlternation.h @@ -29,7 +29,7 @@ protected: * @copydoc FormalRegExpElement::clone() const */ virtual UnboundedRegExpElement* cloneAsUnbounded() const; - + FormalRegExpElement* left; FormalRegExpElement* right; @@ -37,32 +37,32 @@ protected: * @copydoc FormalRegExpElement::testSymbol() const */ virtual bool testSymbol( const alphabet::Symbol & symbol ) const; - + /** * @copydoc FormalRegExpElement::attachRegExp() */ virtual bool attachRegExp ( const FormalRegExp * regexp ); - + /** * @copydoc FormalRegExpElement::computeMinimalAlphabet() */ virtual void computeMinimalAlphabet( std::set<alphabet::Symbol>& alphabet ) const; - + public: explicit FormalRegExpAlternation(FormalRegExpElement&& left, FormalRegExpElement&& right); explicit FormalRegExpAlternation(const FormalRegExpElement& left, const FormalRegExpElement& right); - + FormalRegExpAlternation(const FormalRegExpAlternation& other); FormalRegExpAlternation(FormalRegExpAlternation&& other) noexcept; FormalRegExpAlternation& operator =(const FormalRegExpAlternation& other); - FormalRegExpAlternation& operator =(FormalRegExpAlternation&& other); + FormalRegExpAlternation& operator =(FormalRegExpAlternation&& other) noexcept; virtual ~FormalRegExpAlternation() noexcept; /** * @copydoc FormalRegExpElement::clone() const */ virtual FormalRegExpElement* clone() const; - + /** * @copydoc FormalRegExpElement::plunder() const */ @@ -73,7 +73,7 @@ public: */ const FormalRegExpElement & getLeftElement() const; const FormalRegExpElement & getRightElement() const; - + /** * @return elements */ @@ -97,7 +97,7 @@ public: } virtual int compare(const FormalRegExpAlternation&) const; - + /** * @copydoc FormalRegExpElement::operator>>() const */ diff --git a/alib2data/src/regexp/formal/FormalRegExpConcatenation.cpp b/alib2data/src/regexp/formal/FormalRegExpConcatenation.cpp index 9dee89ae1e92ea9760ab9e8c1a885a8d0deb05c0..3776a3a094d25078e7d7935bddad0121e3157cd1 100644 --- a/alib2data/src/regexp/formal/FormalRegExpConcatenation.cpp +++ b/alib2data/src/regexp/formal/FormalRegExpConcatenation.cpp @@ -38,17 +38,17 @@ FormalRegExpConcatenation& FormalRegExpConcatenation::operator=(const FormalRegE } *this = FormalRegExpConcatenation(other); - + return *this; } -FormalRegExpConcatenation& FormalRegExpConcatenation::operator=(FormalRegExpConcatenation&& other) { +FormalRegExpConcatenation& FormalRegExpConcatenation::operator=(FormalRegExpConcatenation&& other) noexcept { std::swap(this->left, other.left); std::swap(this->right, other.right); this->left->attachRegExp(this->parentRegExp); this->right->attachRegExp(this->parentRegExp); - + return *this; } @@ -111,11 +111,11 @@ FormalRegExpElement* FormalRegExpConcatenation::clone() const { UnboundedRegExpElement* FormalRegExpConcatenation::cloneAsUnbounded() const { UnboundedRegExpConcatenation* res = new UnboundedRegExpConcatenation(); - + UnboundedRegExpElement* leftTmp = left->cloneAsUnbounded(); res->appendElement(std::move(*leftTmp)); delete leftTmp; - + UnboundedRegExpElement* rightTmp = right->cloneAsUnbounded(); res->appendElement(std::move(*rightTmp)); delete rightTmp; @@ -148,7 +148,7 @@ bool FormalRegExpConcatenation::testSymbol( const alphabet::Symbol & symbol ) co bool FormalRegExpConcatenation::attachRegExp(const FormalRegExp * regexp ) { if(this->parentRegExp == regexp) return true; - + this->parentRegExp = regexp; if(!left->attachRegExp(regexp)) return false; if(!right->attachRegExp(regexp)) return false; diff --git a/alib2data/src/regexp/formal/FormalRegExpConcatenation.h b/alib2data/src/regexp/formal/FormalRegExpConcatenation.h index c64d9c9d8868da7c3df9dacbd6f6c7c123a6eb13..16be1ad50cccc92f7596013d00bfe81d4cc8bb12 100644 --- a/alib2data/src/regexp/formal/FormalRegExpConcatenation.h +++ b/alib2data/src/regexp/formal/FormalRegExpConcatenation.h @@ -30,20 +30,20 @@ protected: * @copydoc FormalRegExpElement::clone() const */ virtual UnboundedRegExpElement* cloneAsUnbounded() const; - + FormalRegExpElement* left; FormalRegExpElement* right; - + /** * @copydoc FormalRegExpElement::testSymbol() const */ virtual bool testSymbol( const alphabet::Symbol & symbol ) const; - + /** * @copydoc FormalRegExpElement::attachRegExp() */ virtual bool attachRegExp ( const FormalRegExp * regexp ); - + /** * @copydoc FormalRegExpElement::computeMinimalAlphabet() */ @@ -52,18 +52,18 @@ protected: public: explicit FormalRegExpConcatenation(FormalRegExpElement&& left, FormalRegExpElement&& right); explicit FormalRegExpConcatenation(const FormalRegExpElement& left, const FormalRegExpElement& right); - + FormalRegExpConcatenation(const FormalRegExpConcatenation& other); FormalRegExpConcatenation(FormalRegExpConcatenation&& other) noexcept; FormalRegExpConcatenation& operator =(const FormalRegExpConcatenation& other); - FormalRegExpConcatenation& operator =(FormalRegExpConcatenation&& other); + FormalRegExpConcatenation& operator =(FormalRegExpConcatenation&& other) noexcept; virtual ~FormalRegExpConcatenation() noexcept; - + /** * @copydoc FormalRegExpElement::clone() const */ virtual FormalRegExpElement* clone() const; - + /** * @copydoc FormalRegExpElement::plunder() const */ @@ -86,7 +86,7 @@ public: */ void setLeftElement(const FormalRegExpElement& element); void setLeftElement(FormalRegExpElement&& element); - + void setRightElement(const FormalRegExpElement& element); void setRightElement(FormalRegExpElement&& element); diff --git a/alib2data/src/regexp/formal/FormalRegExpElement.h b/alib2data/src/regexp/formal/FormalRegExpElement.h index 30ff34d1c4615df7dd310934ff50111f7a29d1f3..4a1e92393521be730228dfa6609736de034320c0 100644 --- a/alib2data/src/regexp/formal/FormalRegExpElement.h +++ b/alib2data/src/regexp/formal/FormalRegExpElement.h @@ -59,7 +59,7 @@ protected: * @return true if symbols used in regexp element are in the regexp's alphabet */ virtual bool attachRegExp ( const FormalRegExp * regexp ) = 0; - + /** * Traverses the regexp tree computing minimal alphabet needed by regexp * @@ -67,7 +67,7 @@ protected: * @return true if symbol is used by the element and its successor */ virtual void computeMinimalAlphabet( std::set<alphabet::Symbol>& alphabet ) const = 0; - + public: explicit FormalRegExpElement(); @@ -78,7 +78,7 @@ public: virtual UnboundedRegExpElement* cloneAsUnbounded() const = 0; friend class FormalRegExp; - + friend class FormalRegExpAlternation; friend class FormalRegExpConcatenation; friend class FormalRegExpIteration; diff --git a/alib2data/src/regexp/formal/FormalRegExpEmpty.cpp b/alib2data/src/regexp/formal/FormalRegExpEmpty.cpp index e9762b674e467bbd684611dd6a7402e2926cc6eb..71b44316fdb0e1fe460ce01392e6ca8a2ed09360 100644 --- a/alib2data/src/regexp/formal/FormalRegExpEmpty.cpp +++ b/alib2data/src/regexp/formal/FormalRegExpEmpty.cpp @@ -11,25 +11,25 @@ namespace regexp { FormalRegExpEmpty::FormalRegExpEmpty() { - // so that default constructor is available + // so that default constructor is available } FormalRegExpEmpty::FormalRegExpEmpty(const FormalRegExpEmpty&) { - // so that copy constructor is available + // so that copy constructor is available } FormalRegExpEmpty::FormalRegExpEmpty(FormalRegExpEmpty&&) noexcept { - this->attachRegExp(NULL); + this->attachRegExp(NULL); } FormalRegExpEmpty& FormalRegExpEmpty::operator =(const FormalRegExpEmpty&) { - //this is actually different than default implementation - return *this; + // this is actually different than default implementation + return *this; } FormalRegExpEmpty& FormalRegExpEmpty::operator =(FormalRegExpEmpty&&) noexcept { - //this is actually different than default implementation - return *this; + // this is actually different than default implementation + return *this; } FormalRegExpElement* FormalRegExpEmpty::clone() const { diff --git a/alib2data/src/regexp/formal/FormalRegExpEmpty.h b/alib2data/src/regexp/formal/FormalRegExpEmpty.h index 62d91438d7a0fcd1fa8337bcde2ac0156a656bc4..617a9876b4a33ce0adfac457b9012cbb538cfb33 100644 --- a/alib2data/src/regexp/formal/FormalRegExpEmpty.h +++ b/alib2data/src/regexp/formal/FormalRegExpEmpty.h @@ -22,17 +22,17 @@ protected: * @copydoc FormalRegExpElement::clone() const */ virtual UnboundedRegExpElement* cloneAsUnbounded() const; - + /** * @copydoc FormalRegExpElement::testSymbol() const */ virtual bool testSymbol( const alphabet::Symbol & symbol ) const; - + /** * @copydoc FormalRegExpElement::attachRegExp() */ virtual bool attachRegExp ( const FormalRegExp * regexp ); - + /** * @copydoc RegExpElement::computeMinimalAlphabet() */ @@ -49,7 +49,7 @@ public: * @copydoc FormalRegExpElement::clone() const */ virtual FormalRegExpElement* clone() const; - + /** * @copydoc FormalRegExpElement::plunder() const */ @@ -60,7 +60,7 @@ public: } virtual int compare(const FormalRegExpEmpty&) const; - + /** * @copydoc FormalRegExpElement::operator>>() const */ diff --git a/alib2data/src/regexp/formal/FormalRegExpEpsilon.cpp b/alib2data/src/regexp/formal/FormalRegExpEpsilon.cpp index 63f85748df44338b34ea800f8497bac214bd2052..7b55e73c9cb847e4abc8ff3d0198457dbaa49d3e 100644 --- a/alib2data/src/regexp/formal/FormalRegExpEpsilon.cpp +++ b/alib2data/src/regexp/formal/FormalRegExpEpsilon.cpp @@ -12,11 +12,11 @@ namespace regexp { FormalRegExpEpsilon::FormalRegExpEpsilon() { - // so that default constructor is available + // so that default constructor is available } FormalRegExpEpsilon::FormalRegExpEpsilon(const FormalRegExpEpsilon&) { - // so that copy constructor is available + // so that copy constructor is available } FormalRegExpEpsilon::FormalRegExpEpsilon(FormalRegExpEpsilon&&) noexcept { @@ -24,13 +24,13 @@ FormalRegExpEpsilon::FormalRegExpEpsilon(FormalRegExpEpsilon&&) noexcept { } FormalRegExpEpsilon& FormalRegExpEpsilon::operator =(const FormalRegExpEpsilon&) { - //this is actually different than default implementation - return *this; + // this is actually different than default implementation + return *this; } FormalRegExpEpsilon& FormalRegExpEpsilon::operator =(FormalRegExpEpsilon&&) noexcept { - //this is actually different than default implementation - return *this; + // this is actually different than default implementation + return *this; } FormalRegExpElement* FormalRegExpEpsilon::clone() const { @@ -46,7 +46,7 @@ UnboundedRegExpElement* FormalRegExpEpsilon::cloneAsUnbounded() const { } int FormalRegExpEpsilon::compare(const FormalRegExpEpsilon&) const { - return 0; + return 0; } void FormalRegExpEpsilon::operator>>(std::ostream& out) const { diff --git a/alib2data/src/regexp/formal/FormalRegExpEpsilon.h b/alib2data/src/regexp/formal/FormalRegExpEpsilon.h index bc91013adc09ae485ad4998dba1bdfa10d521e16..a4beae2722b8f17b6474294981b7c9843d6964e7 100644 --- a/alib2data/src/regexp/formal/FormalRegExpEpsilon.h +++ b/alib2data/src/regexp/formal/FormalRegExpEpsilon.h @@ -22,17 +22,17 @@ protected: * @copydoc FormalRegExpElement::clone() const */ virtual UnboundedRegExpElement* cloneAsUnbounded() const; - + /** * @copydoc FormalRegExpElement::testSymbol() const */ virtual bool testSymbol( const alphabet::Symbol & symbol ) const; - + /** * @copydoc FormalRegExpElement::attachRegExp() */ virtual bool attachRegExp ( const FormalRegExp * regexp ); - + /** * @copydoc FormalRegExpElement::computeMinimalAlphabet() */ @@ -50,18 +50,18 @@ public: * @copydoc FormalRegExpElement::clone() const */ virtual FormalRegExpElement* clone() const; - + /** * @copydoc FormalRegExpElement::plunder() const */ virtual FormalRegExpElement* plunder() &&; - + virtual int compare(const FormalRegExpElement& other) const { return -other.compare(*this); } virtual int compare(const FormalRegExpEpsilon&) const; - + /** * @copydoc FormalRegExpElement::operator>>() const */ diff --git a/alib2data/src/regexp/formal/FormalRegExpIteration.cpp b/alib2data/src/regexp/formal/FormalRegExpIteration.cpp index 1eef7c48589b27c6f806120393105d4181a36c35..a769b4fd155ad82867481784672204211555d6bd 100644 --- a/alib2data/src/regexp/formal/FormalRegExpIteration.cpp +++ b/alib2data/src/regexp/formal/FormalRegExpIteration.cpp @@ -41,10 +41,10 @@ FormalRegExpIteration& FormalRegExpIteration::operator=(const FormalRegExpIterat return *this; } -FormalRegExpIteration& FormalRegExpIteration::operator=(FormalRegExpIteration&& other) { +FormalRegExpIteration& FormalRegExpIteration::operator=(FormalRegExpIteration&& other) noexcept { std::swap(this->element, other.element); std::swap(this->parentRegExp, other.parentRegExp); - + this->attachRegExp(other.parentRegExp); return *this; diff --git a/alib2data/src/regexp/formal/FormalRegExpIteration.h b/alib2data/src/regexp/formal/FormalRegExpIteration.h index 6a1e1d42f6577724829d7f92b59fbb5caa5a3490..25ff175a7bf59c3807c8e5e79b6045923b6e2031 100644 --- a/alib2data/src/regexp/formal/FormalRegExpIteration.h +++ b/alib2data/src/regexp/formal/FormalRegExpIteration.h @@ -31,7 +31,7 @@ protected: * @copydoc FormalRegExpElement::clone() const */ virtual UnboundedRegExpElement* cloneAsUnbounded() const; - + /** * @copydoc FormalRegExpElement::testSymbol() const */ @@ -41,27 +41,27 @@ protected: * @copydoc FormalRegExpElement::attachRegExp() */ virtual bool attachRegExp ( const FormalRegExp * regexp ); - + /** * @copydoc FormalRegExpElement::computeMinimalAlphabet() */ virtual void computeMinimalAlphabet( std::set<alphabet::Symbol>& alphabet ) const; - + public: explicit FormalRegExpIteration(FormalRegExpElement&&); explicit FormalRegExpIteration(const FormalRegExpElement&); - + FormalRegExpIteration(const FormalRegExpIteration& other); FormalRegExpIteration(FormalRegExpIteration&& other) noexcept; FormalRegExpIteration& operator =(const FormalRegExpIteration& other); - FormalRegExpIteration& operator =(FormalRegExpIteration&& other); + FormalRegExpIteration& operator =(FormalRegExpIteration&& other) noexcept; virtual ~FormalRegExpIteration() noexcept; /** * @copydoc FormalRegExpElement::clone() const */ virtual FormalRegExpElement* clone() const; - + /** * @copydoc FormalRegExpElement::plunder() const */ @@ -72,17 +72,17 @@ public: * @return element */ const FormalRegExpElement & getElement() const; - + /** * @return element */ FormalRegExpElement & getElement(); - + /** * @param element to iterate */ void setElement(const FormalRegExpElement& element); - + void setElement(FormalRegExpElement&& element); virtual int compare(const FormalRegExpElement& other) const { diff --git a/alib2data/src/regexp/formal/FormalRegExpSymbol.cpp b/alib2data/src/regexp/formal/FormalRegExpSymbol.cpp index e2c1b5547471c139c88e86d76c5caa80cd0763e7..fb3df17af388dfe96d5192f6da35dbd91e696104 100644 --- a/alib2data/src/regexp/formal/FormalRegExpSymbol.cpp +++ b/alib2data/src/regexp/formal/FormalRegExpSymbol.cpp @@ -41,12 +41,12 @@ FormalRegExpSymbol& FormalRegExpSymbol::operator=(const FormalRegExpSymbol& othe return *this; } -FormalRegExpSymbol& FormalRegExpSymbol::operator=(FormalRegExpSymbol&& other) { +FormalRegExpSymbol& FormalRegExpSymbol::operator=(FormalRegExpSymbol&& other) noexcept { std::swap(this->symbol, other.symbol); std::swap(this->parentRegExp, other.parentRegExp); - + this->attachRegExp(other.parentRegExp); - + return *this; } diff --git a/alib2data/src/regexp/formal/FormalRegExpSymbol.h b/alib2data/src/regexp/formal/FormalRegExpSymbol.h index 3a7cd16d79b7c5f64a1c80d616096ab44e96af09..bfab54dde60cba8d65eeac4207591fe8c32c0eda 100644 --- a/alib2data/src/regexp/formal/FormalRegExpSymbol.h +++ b/alib2data/src/regexp/formal/FormalRegExpSymbol.h @@ -25,17 +25,17 @@ protected: * @copydoc FormalRegExpElement::clone() const */ virtual UnboundedRegExpElement* cloneAsUnbounded() const; - + /** * @copydoc FormalRegExpElement::testSymbol() const */ virtual bool testSymbol( const alphabet::Symbol & symbol ) const; - + /** * @copydoc FormalRegExpElement::attachRegExp() */ virtual bool attachRegExp ( const FormalRegExp * regexp ); - + /** * @copydoc FormalRegExpElement::computeMinimalAlphabet() */ @@ -47,23 +47,23 @@ public: explicit FormalRegExpSymbol(const alphabet::Symbol& symbol); explicit FormalRegExpSymbol(alphabet::Symbol&& symbol); - + FormalRegExpSymbol(const FormalRegExpSymbol& other); FormalRegExpSymbol(FormalRegExpSymbol&& other) noexcept; FormalRegExpSymbol& operator=(const FormalRegExpSymbol& other); - FormalRegExpSymbol& operator=(FormalRegExpSymbol&& other); + FormalRegExpSymbol& operator=(FormalRegExpSymbol&& other) noexcept; /** * @copydoc FormalRegExpElement::clone() const */ virtual FormalRegExpElement* clone() const; - + /** * @copydoc FormalRegExpElement::plunder() const */ virtual FormalRegExpElement* plunder() &&; - + bool operator==(const alphabet::Symbol&) const; friend bool operator==(const alphabet::Symbol&, const FormalRegExpSymbol&); @@ -72,12 +72,12 @@ public: } virtual int compare(const FormalRegExpSymbol&) const; - + /** * @copydoc FormalRegExpElement::operator>>() const */ virtual void operator>>(std::ostream& out) const; - + /** * Returns the string representation of RegExp Symbol. */ diff --git a/alib2data/src/regexp/unbounded/UnboundedRegExpAlternation.cpp b/alib2data/src/regexp/unbounded/UnboundedRegExpAlternation.cpp index 1df63332c4bcb26e854d83660faa5ca981da25f1..2f418d4bcfdbeec274539a5ddefc05580bac669f 100644 --- a/alib2data/src/regexp/unbounded/UnboundedRegExpAlternation.cpp +++ b/alib2data/src/regexp/unbounded/UnboundedRegExpAlternation.cpp @@ -38,12 +38,12 @@ UnboundedRegExpAlternation& UnboundedRegExpAlternation::operator=(const Unbounde return *this; } -UnboundedRegExpAlternation& UnboundedRegExpAlternation::operator=(UnboundedRegExpAlternation&& other) { +UnboundedRegExpAlternation& UnboundedRegExpAlternation::operator=(UnboundedRegExpAlternation&& other) noexcept { std::swap(this->elements, other.elements); std::swap(this->parentRegExp, other.parentRegExp); // this->parentRegExp is stored within othes.parentRegExp and it is reattached on the next line - + this->attachRegExp(other.parentRegExp); - + return *this; } @@ -139,7 +139,7 @@ bool UnboundedRegExpAlternation::testSymbol( const alphabet::Symbol & symbol ) c bool UnboundedRegExpAlternation::attachRegExp(const UnboundedRegExp * regexp ) { if(this->parentRegExp == regexp) return true; - + this->parentRegExp = regexp; for(const auto& child : this->elements) if(!child->attachRegExp(regexp)) return false; diff --git a/alib2data/src/regexp/unbounded/UnboundedRegExpAlternation.h b/alib2data/src/regexp/unbounded/UnboundedRegExpAlternation.h index c250ab5247a2b9d5a07b713c64e922fcfb368de4..1e01e6c0f13b0662bdc91d30592340dd4c53bbfb 100644 --- a/alib2data/src/regexp/unbounded/UnboundedRegExpAlternation.h +++ b/alib2data/src/regexp/unbounded/UnboundedRegExpAlternation.h @@ -53,7 +53,7 @@ public: UnboundedRegExpAlternation(const UnboundedRegExpAlternation& other); UnboundedRegExpAlternation(UnboundedRegExpAlternation&& other) noexcept; UnboundedRegExpAlternation& operator =(const UnboundedRegExpAlternation& other); - UnboundedRegExpAlternation& operator =(UnboundedRegExpAlternation&& other); + UnboundedRegExpAlternation& operator =(UnboundedRegExpAlternation&& other) noexcept; virtual ~UnboundedRegExpAlternation() noexcept; /** diff --git a/alib2data/src/regexp/unbounded/UnboundedRegExpConcatenation.cpp b/alib2data/src/regexp/unbounded/UnboundedRegExpConcatenation.cpp index 334d1c1e8dedea952c668d005bc602e8089da161..b12581b6b47427f6e4a1dd733a0528b10bebf9f5 100644 --- a/alib2data/src/regexp/unbounded/UnboundedRegExpConcatenation.cpp +++ b/alib2data/src/regexp/unbounded/UnboundedRegExpConcatenation.cpp @@ -37,7 +37,7 @@ UnboundedRegExpConcatenation& UnboundedRegExpConcatenation::operator=(const Unbo return *this; } -UnboundedRegExpConcatenation& UnboundedRegExpConcatenation::operator=(UnboundedRegExpConcatenation&& other) { +UnboundedRegExpConcatenation& UnboundedRegExpConcatenation::operator=(UnboundedRegExpConcatenation&& other) noexcept { std::swap(this->elements, other.elements); std::swap(this->parentRegExp, other.parentRegExp); // this->parentRegExp is stored within othes.parentRegExp and it is reattached on the next line diff --git a/alib2data/src/regexp/unbounded/UnboundedRegExpConcatenation.h b/alib2data/src/regexp/unbounded/UnboundedRegExpConcatenation.h index b3b7031ad2fb7a491f1066f084d9f4baaa4c6793..957bc2fa23b8b4447fbb0b299886eb5cd0faee96 100644 --- a/alib2data/src/regexp/unbounded/UnboundedRegExpConcatenation.h +++ b/alib2data/src/regexp/unbounded/UnboundedRegExpConcatenation.h @@ -32,17 +32,17 @@ protected: std::vector<UnboundedRegExpElement*> elements; - + /** * @copydoc UnboundedRegExpElement::testSymbol() const */ virtual bool testSymbol( const alphabet::Symbol & symbol ) const; - + /** * @copydoc UnboundedRegExpElement::attachRegExp() */ virtual bool attachRegExp ( const UnboundedRegExp * regexp ); - + /** * @copydoc UnboundedRegExpElement::computeMinimalAlphabet() */ @@ -50,11 +50,11 @@ protected: public: explicit UnboundedRegExpConcatenation(); - + UnboundedRegExpConcatenation(const UnboundedRegExpConcatenation& other); UnboundedRegExpConcatenation(UnboundedRegExpConcatenation&& other) noexcept; UnboundedRegExpConcatenation& operator =(const UnboundedRegExpConcatenation& other); - UnboundedRegExpConcatenation& operator =(UnboundedRegExpConcatenation&& other); + UnboundedRegExpConcatenation& operator =(UnboundedRegExpConcatenation&& other) noexcept; virtual ~UnboundedRegExpConcatenation() noexcept; /** @@ -67,7 +67,7 @@ public: */ virtual UnboundedRegExpElement* plunder() &&; - + /** * @return elements */ @@ -82,7 +82,7 @@ public: * @param element to append */ void appendElement(const UnboundedRegExpElement& element); - + void appendElement(UnboundedRegExpElement&& element); virtual int compare(const UnboundedRegExpElement& other) const { diff --git a/alib2data/src/regexp/unbounded/UnboundedRegExpElement.h b/alib2data/src/regexp/unbounded/UnboundedRegExpElement.h index b057c8d0a2caf23d7b567fc24c00441ac1acc6f4..684a2e35bd8559c6b94dd15d03da8fc5eca74f5d 100644 --- a/alib2data/src/regexp/unbounded/UnboundedRegExpElement.h +++ b/alib2data/src/regexp/unbounded/UnboundedRegExpElement.h @@ -59,7 +59,7 @@ protected: * @return true if symbols used in regexp element are in the regexp's alphabet */ virtual bool attachRegExp ( const UnboundedRegExp * regexp ) = 0; - + /** * Traverses the regexp tree computing minimal alphabet needed by regexp * @@ -67,10 +67,10 @@ protected: * @return true if symbol is used by the element and its successor */ virtual void computeMinimalAlphabet( std::set<alphabet::Symbol>& alphabet ) const = 0; - + public: explicit UnboundedRegExpElement(); - + /** * Creates copy of the element. * @return copy of the element @@ -78,7 +78,7 @@ public: virtual FormalRegExpElement* cloneAsFormal() const = 0; friend class UnboundedRegExp; - + friend class UnboundedRegExpAlternation; friend class UnboundedRegExpConcatenation; friend class UnboundedRegExpIteration; diff --git a/alib2data/src/regexp/unbounded/UnboundedRegExpEmpty.cpp b/alib2data/src/regexp/unbounded/UnboundedRegExpEmpty.cpp index ca5c670c85c7aaadbc9c81376b41ddf31d8e4d1d..dee5c501cdb0c24b518f3aaa891d8f1667b83103 100644 --- a/alib2data/src/regexp/unbounded/UnboundedRegExpEmpty.cpp +++ b/alib2data/src/regexp/unbounded/UnboundedRegExpEmpty.cpp @@ -12,25 +12,25 @@ namespace regexp { UnboundedRegExpEmpty::UnboundedRegExpEmpty() { - // so that default constructor is available + // so that default constructor is available } UnboundedRegExpEmpty::UnboundedRegExpEmpty(const UnboundedRegExpEmpty&) { - // so that copy constructor is available + // so that copy constructor is available } UnboundedRegExpEmpty::UnboundedRegExpEmpty(UnboundedRegExpEmpty&&) noexcept { - this->attachRegExp(NULL); + this->attachRegExp(NULL); } UnboundedRegExpEmpty& UnboundedRegExpEmpty::operator =(const UnboundedRegExpEmpty&) { - //this is actually different than default implementation - return *this; + // this is actually different than default implementation + return *this; } UnboundedRegExpEmpty& UnboundedRegExpEmpty::operator =(UnboundedRegExpEmpty&&) noexcept { - //this is actually different than default implementation - return *this; + // this is actually different than default implementation + return *this; } UnboundedRegExpElement* UnboundedRegExpEmpty::clone() const { diff --git a/alib2data/src/regexp/unbounded/UnboundedRegExpEmpty.h b/alib2data/src/regexp/unbounded/UnboundedRegExpEmpty.h index eee6cccbe171767795de1bbfe6b4bda42490bd0c..37135c3ce55c587c5d0d07ebb4c09372d23e16ba 100644 --- a/alib2data/src/regexp/unbounded/UnboundedRegExpEmpty.h +++ b/alib2data/src/regexp/unbounded/UnboundedRegExpEmpty.h @@ -26,12 +26,12 @@ protected: * @copydoc UnboundedRegExpElement::testSymbol() const */ virtual bool testSymbol( const alphabet::Symbol & symbol ) const; - + /** * @copydoc UnboundedRegExpElement::attachRegExp() */ virtual bool attachRegExp ( const UnboundedRegExp * regexp ); - + /** * @copydoc RegExpElement::computeMinimalAlphabet() */ @@ -48,7 +48,7 @@ public: * @copydoc UnboundedRegExpElement::clone() const */ virtual UnboundedRegExpElement* clone() const; - + /** * @copydoc UnboundedRegExpElement::plunder() const */ @@ -59,7 +59,7 @@ public: } virtual int compare(const UnboundedRegExpEmpty&) const; - + /** * @copydoc UnboundedRegExpElement::operator>>() const */ diff --git a/alib2data/src/regexp/unbounded/UnboundedRegExpEpsilon.cpp b/alib2data/src/regexp/unbounded/UnboundedRegExpEpsilon.cpp index 964d1dd1d91aa9add2ef1dc385e5aefd1ec27d5b..0ecd629c8c31568484d792d83b75869e7cc37193 100644 --- a/alib2data/src/regexp/unbounded/UnboundedRegExpEpsilon.cpp +++ b/alib2data/src/regexp/unbounded/UnboundedRegExpEpsilon.cpp @@ -12,11 +12,11 @@ namespace regexp { UnboundedRegExpEpsilon::UnboundedRegExpEpsilon() { - // so that default constructor is available + // so that default constructor is available } UnboundedRegExpEpsilon::UnboundedRegExpEpsilon(const UnboundedRegExpEpsilon&) { - // so that copy constructor is available + // so that copy constructor is available } UnboundedRegExpEpsilon::UnboundedRegExpEpsilon(UnboundedRegExpEpsilon&&) noexcept { @@ -24,13 +24,13 @@ UnboundedRegExpEpsilon::UnboundedRegExpEpsilon(UnboundedRegExpEpsilon&&) noexcep } UnboundedRegExpEpsilon& UnboundedRegExpEpsilon::operator =(const UnboundedRegExpEpsilon&) { - //this is actually different than default implementation - return *this; + // this is actually different than default implementation + return *this; } UnboundedRegExpEpsilon& UnboundedRegExpEpsilon::operator =(UnboundedRegExpEpsilon&&) noexcept { - //this is actually different than default implementation - return *this; + // this is actually different than default implementation + return *this; } UnboundedRegExpElement* UnboundedRegExpEpsilon::clone() const { @@ -46,7 +46,7 @@ FormalRegExpElement* UnboundedRegExpEpsilon::cloneAsFormal() const { } int UnboundedRegExpEpsilon::compare(const UnboundedRegExpEpsilon&) const { - return 0; + return 0; } void UnboundedRegExpEpsilon::operator>>(std::ostream& out) const { diff --git a/alib2data/src/regexp/unbounded/UnboundedRegExpEpsilon.h b/alib2data/src/regexp/unbounded/UnboundedRegExpEpsilon.h index fe478f502e1e54e06bc4470a7fab4669f3a85e63..66e8501fffd78e4b5e42930165dd63666ed4abaa 100644 --- a/alib2data/src/regexp/unbounded/UnboundedRegExpEpsilon.h +++ b/alib2data/src/regexp/unbounded/UnboundedRegExpEpsilon.h @@ -26,12 +26,12 @@ protected: * @copydoc UnboundedRegExpElement::testSymbol() const */ virtual bool testSymbol( const alphabet::Symbol & symbol ) const; - + /** * @copydoc UnboundedRegExpElement::attachRegExp() */ virtual bool attachRegExp ( const UnboundedRegExp * regexp ); - + /** * @copydoc UnboundedRegExpElement::computeMinimalAlphabet() */ @@ -49,7 +49,7 @@ public: * @copydoc UnboundedRegExpElement::clone() const */ virtual UnboundedRegExpElement* clone() const; - + /** * @copydoc UnboundedRegExpElement::plunder() const */ @@ -60,7 +60,7 @@ public: } virtual int compare(const UnboundedRegExpEpsilon&) const; - + /** * @copydoc UnboundedRegExpElement::operator>>() const */ diff --git a/alib2data/src/regexp/unbounded/UnboundedRegExpIteration.cpp b/alib2data/src/regexp/unbounded/UnboundedRegExpIteration.cpp index 2b139cabb640da88325b7ebd7df3f5b2b9369d33..02a185416e3c29667c690dd87222b8e807ea8471 100644 --- a/alib2data/src/regexp/unbounded/UnboundedRegExpIteration.cpp +++ b/alib2data/src/regexp/unbounded/UnboundedRegExpIteration.cpp @@ -41,10 +41,10 @@ UnboundedRegExpIteration& UnboundedRegExpIteration::operator=(const UnboundedReg return *this; } -UnboundedRegExpIteration& UnboundedRegExpIteration::operator=(UnboundedRegExpIteration&& other) { +UnboundedRegExpIteration& UnboundedRegExpIteration::operator=(UnboundedRegExpIteration&& other) noexcept { std::swap(this->element, other.element); std::swap(this->parentRegExp, other.parentRegExp); - + this->attachRegExp(other.parentRegExp); return *this; diff --git a/alib2data/src/regexp/unbounded/UnboundedRegExpIteration.h b/alib2data/src/regexp/unbounded/UnboundedRegExpIteration.h index 3fd2cff71210397ec90400264bdf3cf7359724ea..f24f90720bf7308f7fe3f8572b87a10b8d7ebe97 100644 --- a/alib2data/src/regexp/unbounded/UnboundedRegExpIteration.h +++ b/alib2data/src/regexp/unbounded/UnboundedRegExpIteration.h @@ -41,27 +41,27 @@ protected: * @copydoc UnboundedRegExpElement::attachRegExp() */ virtual bool attachRegExp ( const UnboundedRegExp * regexp ); - + /** * @copydoc UnboundedRegExpElement::computeMinimalAlphabet() */ virtual void computeMinimalAlphabet( std::set<alphabet::Symbol>& alphabet ) const; - + public: explicit UnboundedRegExpIteration(UnboundedRegExpElement&&); explicit UnboundedRegExpIteration(const UnboundedRegExpElement&); - + UnboundedRegExpIteration(const UnboundedRegExpIteration& other); UnboundedRegExpIteration(UnboundedRegExpIteration&& other) noexcept; UnboundedRegExpIteration& operator =(const UnboundedRegExpIteration& other); - UnboundedRegExpIteration& operator =(UnboundedRegExpIteration&& other); + UnboundedRegExpIteration& operator =(UnboundedRegExpIteration&& other) noexcept; virtual ~UnboundedRegExpIteration() noexcept; /** * @copydoc UnboundedRegExpElement::clone() const */ virtual UnboundedRegExpElement* clone() const; - + /** * @copydoc UnboundedRegExpElement::plunder() const */ @@ -71,17 +71,17 @@ public: * @return element */ const UnboundedRegExpElement & getElement() const; - + /** * @return element */ UnboundedRegExpElement & getElement(); - + /** * @param element to iterate */ void setElement(const UnboundedRegExpElement& element); - + void setElement(UnboundedRegExpElement&& element); virtual int compare(const UnboundedRegExpElement& other) const { diff --git a/alib2data/src/regexp/unbounded/UnboundedRegExpSymbol.cpp b/alib2data/src/regexp/unbounded/UnboundedRegExpSymbol.cpp index 47e5e49ad0587b596f115f06b7471cd0630fd511..8145ffbfcbdc2f12f1c85033436a00da9166dbe8 100644 --- a/alib2data/src/regexp/unbounded/UnboundedRegExpSymbol.cpp +++ b/alib2data/src/regexp/unbounded/UnboundedRegExpSymbol.cpp @@ -41,12 +41,12 @@ UnboundedRegExpSymbol& UnboundedRegExpSymbol::operator=(const UnboundedRegExpSym return *this; } -UnboundedRegExpSymbol& UnboundedRegExpSymbol::operator=(UnboundedRegExpSymbol&& other) { +UnboundedRegExpSymbol& UnboundedRegExpSymbol::operator=(UnboundedRegExpSymbol&& other) noexcept { std::swap(this->symbol, other.symbol); std::swap(this->parentRegExp, other.parentRegExp); - + this->attachRegExp(other.parentRegExp); - + return *this; } diff --git a/alib2data/src/regexp/unbounded/UnboundedRegExpSymbol.h b/alib2data/src/regexp/unbounded/UnboundedRegExpSymbol.h index e5bb25efdea85b561a0fddc1898d7069c897542e..8328d789acce49f674741d760a126e07373c5d1a 100644 --- a/alib2data/src/regexp/unbounded/UnboundedRegExpSymbol.h +++ b/alib2data/src/regexp/unbounded/UnboundedRegExpSymbol.h @@ -30,12 +30,12 @@ protected: * @copydoc UnboundedRegExpElement::testSymbol() const */ virtual bool testSymbol( const alphabet::Symbol & symbol ) const; - + /** * @copydoc UnboundedRegExpElement::attachRegExp() */ virtual bool attachRegExp ( const UnboundedRegExp * regexp ); - + /** * @copydoc UnboundedRegExpElement::computeMinimalAlphabet() */ @@ -47,17 +47,17 @@ public: explicit UnboundedRegExpSymbol(const alphabet::Symbol& symbol); explicit UnboundedRegExpSymbol(alphabet::Symbol&& symbol); - + UnboundedRegExpSymbol(const UnboundedRegExpSymbol& other); UnboundedRegExpSymbol(UnboundedRegExpSymbol&& other) noexcept; UnboundedRegExpSymbol& operator=(const UnboundedRegExpSymbol& other); - UnboundedRegExpSymbol& operator=(UnboundedRegExpSymbol&& other); + UnboundedRegExpSymbol& operator=(UnboundedRegExpSymbol&& other) noexcept; /** * @copydoc UnboundedRegExpElement::clone() const */ virtual UnboundedRegExpElement* clone() const; - + /** * @copydoc UnboundedRegExpElement::plunder() const */ @@ -71,12 +71,12 @@ public: } virtual int compare(const UnboundedRegExpSymbol&) const; - + /** * @copydoc UnboundedRegExpElement::operator>>() const */ virtual void operator>>(std::ostream& out) const; - + /** * Returns the string representation of RegExp Symbol. */ diff --git a/alib2data/src/std/variant.hpp b/alib2data/src/std/variant.hpp index 7ffc7220636c305ab96b69a4ceeef3134e15fe28..22352c04772419e877051f8f68cff67a71e4b184 100644 --- a/alib2data/src/std/variant.hpp +++ b/alib2data/src/std/variant.hpp @@ -141,14 +141,14 @@ public: } //move constructor - variant(variant<Ts...>&& old) : variant_base<static_max<sizeof(Ts)...>, static_max<alignof(Ts)...>, Ts...>() + variant(variant<Ts...>&& old) noexcept : variant_base<static_max<sizeof(Ts)...>, static_max<alignof(Ts)...>, Ts...>() { this->type_id = old.type_id; helper_t::move(old.type_id, &old.data, &this->data); } //assignment operator - variant<Ts...>& operator= (variant<Ts...> old) + variant<Ts...>& operator= (variant<Ts...> old) noexcept { std::swap(this->type_id, old.type_id); std::swap(this->data, old.data); @@ -239,7 +239,7 @@ public: throw std::bad_cast(); } - ~variant() { + ~variant() noexcept { helper_t::destroy(this->type_id, &this->data); }