From 36f85886969e54759cb020a317649e5b4c0ed69d Mon Sep 17 00:00:00 2001
From: Jan Travnicek <Jan.Travnicek@fit.cvut.cz>
Date: Fri, 9 Oct 2015 10:42:07 +0200
Subject: [PATCH] format modified string sources

---
 alib2data/src/string/String.cpp   | 31 ++++++++++++++++++++-----------
 alib2data/src/string/String.h     | 25 +++++++++++++------------
 alib2data/src/string/StringBase.h | 18 +++++++++---------
 3 files changed, 42 insertions(+), 32 deletions(-)

diff --git a/alib2data/src/string/String.cpp b/alib2data/src/string/String.cpp
index 6830d20cb7..208abc0a96 100644
--- a/alib2data/src/string/String.cpp
+++ b/alib2data/src/string/String.cpp
@@ -12,25 +12,34 @@
 
 namespace string {
 
-const std::set<alphabet::Symbol>& String::getAlphabet() const {
-	return this->getData().getAlphabet();
+const std::set < alphabet::Symbol > & String::getAlphabet ( ) const {
+	return this->getData ( ).getAlphabet ( );
 }
 
-void String::extendAlphabet(const std::set < alphabet::Symbol > & symbols ) {
-	this->getData().extendAlphabet(symbols);
+void String::extendAlphabet ( const std::set < alphabet::Symbol > & symbols ) {
+	this->getData ( ).extendAlphabet ( symbols );
 }
 
-string::String stringFrom( const alphabet::Symbol& symbol ) {
-	return string::String { string::LinearString { std::vector<alphabet::Symbol> { symbol } } };
+string::String stringFrom ( const alphabet::Symbol & symbol ) {
+	return string::String {
+			   string::LinearString {
+				   std::vector < alphabet::Symbol > {
+					   symbol
+				   }
+			   }
+	};
 }
 
-string::String stringFrom( const std::string& string ) {
-	return string::String { string::LinearString { string } };
+string::String stringFrom ( const std::string & string ) {
+	return string::String {
+			   string::LinearString {
+				   string
+			   }
+	};
 }
 
-string::String stringFrom( const char* string ) {
-	return stringFrom( (std::string) string);
+string::String stringFrom ( const char * string ) {
+	return stringFrom ( ( std::string ) string );
 }
 
 } /* namespace string */
-
diff --git a/alib2data/src/string/String.h b/alib2data/src/string/String.h
index f6c2802b97..1ff5d1d299 100644
--- a/alib2data/src/string/String.h
+++ b/alib2data/src/string/String.h
@@ -19,29 +19,30 @@ namespace string {
 /**
  * Wrapper around strings.
  */
-class String : public alib::wrapper<StringBase>, public alib::WrapperBase {
-	using alib::wrapper<StringBase>::wrapper;
+class String : public alib::wrapper < StringBase >, public alib::WrapperBase {
+	using alib::wrapper < StringBase >::wrapper;
+
 public:
-	const std::set<alphabet::Symbol>& getAlphabet() const;
-	void extendAlphabet(const std::set < alphabet::Symbol > & symbols );
+	const std::set < alphabet::Symbol > & getAlphabet ( ) const;
+	void extendAlphabet ( const std::set < alphabet::Symbol > & symbols );
 };
 
-string::String stringFrom(const alphabet::Symbol& symbol);
-string::String stringFrom(const std::string& str);
-string::String stringFrom(const char* str);
+string::String stringFrom ( const alphabet::Symbol & symbol );
+string::String stringFrom ( const std::string & str );
+string::String stringFrom ( const char * str );
 
 } /* namespace string */
 
 namespace std {
 
-template<>
-struct compare<::string::String> {
-	int operator()(const ::string::String& first, const ::string::String& second) const {
-		return first.getData().compare(second.getData());
+template < >
+struct compare < ::string::String > {
+	int operator ()( const::string::String & first, const::string::String & second ) const {
+		return first.getData ( ).compare ( second.getData ( ) );
 	}
+
 };
 
 } /* namespace std */
 
 #endif /* STRING_H_ */
-
diff --git a/alib2data/src/string/StringBase.h b/alib2data/src/string/StringBase.h
index f0ba7c10d8..b6c173d8f0 100644
--- a/alib2data/src/string/StringBase.h
+++ b/alib2data/src/string/StringBase.h
@@ -19,25 +19,25 @@ namespace string {
  */
 class StringBase : public alib::ObjectBase {
 public:
-	virtual StringBase* clone() const = 0;
-	virtual StringBase* plunder() && = 0;
+	virtual StringBase * clone ( ) const = 0;
+	virtual StringBase * plunder ( ) &&	 = 0;
 
-	virtual const std::set<alphabet::Symbol>& getAlphabet() const = 0;
-	virtual void extendAlphabet(const std::set<alphabet::Symbol>& symbols) = 0;
+	virtual const std::set < alphabet::Symbol > & getAlphabet ( ) const = 0;
+	virtual void extendAlphabet ( const std::set < alphabet::Symbol > & symbols ) = 0;
 };
 
 } /* namespace string */
 
 namespace std {
 
-template<>
-struct compare<::string::StringBase> {
-	int operator()(const ::string::StringBase& first, const ::string::StringBase& second) const {
-		return first.compare(second);
+template < >
+struct compare < ::string::StringBase > {
+	int operator ()( const::string::StringBase & first, const::string::StringBase & second ) const {
+		return first.compare ( second );
 	}
+
 };
 
 } /* namespace std */
 
 #endif /* STRING_BASE_H_ */
-
-- 
GitLab