From 81e273602853e7115085aa1563283910b2fcc512 Mon Sep 17 00:00:00 2001
From: Jan Travnicek <Jan.Travnicek@fit.cvut.cz>
Date: Sat, 22 Oct 2016 13:59:02 +0200
Subject: [PATCH] remove unnecessary local objects and constructors

---
 alib2algo/src/regexp/convert/ToAutomatonDerivation.cpp | 6 ++----
 alib2algo/src/regexp/transform/RegExpIntegral.h        | 2 --
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/alib2algo/src/regexp/convert/ToAutomatonDerivation.cpp b/alib2algo/src/regexp/convert/ToAutomatonDerivation.cpp
index 95bd4c0f56..a8a5b058c2 100644
--- a/alib2algo/src/regexp/convert/ToAutomatonDerivation.cpp
+++ b/alib2algo/src/regexp/convert/ToAutomatonDerivation.cpp
@@ -45,11 +45,10 @@ automaton::DFA<> ToAutomatonDerivation::convert(const T& regexp) {
 		Qi.push_back(std::set<regexp::RegExp>()); // initialize set Q_i
 
 		for(const auto& dregexp : Qi.at(i - 1)) {
-			regexp::RegExpDerivation deriv;
 
 			for(const auto& a : regexp.getAlphabet()) {
 				string::LinearString < > string(std::vector<alphabet::Symbol>{a});
-				regexp::RegExp derived = deriv.derivation(dregexp, string);
+				regexp::RegExp derived = regexp::RegExpDerivation::derivation(dregexp, string);
 				derived = regexp::simplify::RegExpOptimize::optimize(derived);
 
 				// this will also add \emptyset as a regexp (and as FA state)
@@ -82,11 +81,10 @@ automaton::DFA<> ToAutomatonDerivation::convert(const T& regexp) {
 	automaton.setInputAlphabet(regexp.getAlphabet());
 
 	for(const auto& r : Q) {
-		regexp::RegExpDerivation deriv;
 
 		for(const auto& a: regexp.getAlphabet()) {
 			string::LinearString < > string(std::vector<alphabet::Symbol>{a});
-			regexp::RegExp derived = deriv.derivation(r, string);
+			regexp::RegExp derived = regexp::RegExpDerivation::derivation(r, string);
 			derived = regexp::simplify::RegExpOptimize::optimize(derived);
 
 			automaton.addTransition(stateMap.find(r)->second, a, stateMap.find(derived)->second);
diff --git a/alib2algo/src/regexp/transform/RegExpIntegral.h b/alib2algo/src/regexp/transform/RegExpIntegral.h
index d86b725872..3a9fa67313 100644
--- a/alib2algo/src/regexp/transform/RegExpIntegral.h
+++ b/alib2algo/src/regexp/transform/RegExpIntegral.h
@@ -26,8 +26,6 @@ namespace regexp {
  */
 class RegExpIntegral : public std::SingleDispatch < RegExpIntegral, regexp::RegExp, const regexp::RegExpBase &, const string::LinearString < >&> {
 public:
-	RegExpIntegral() {}
-
 	/**
 	 * @param regexp RegExp to integrate
 	 * @param string String to integrate given RegExp over
-- 
GitLab