瀏覽代碼

Improve code quality in boxing module

Patrick-Christopher Mattulat 10 月之前
父節點
當前提交
d3f23d6ce4

+ 12 - 13
include/ls-std/boxing/Boolean.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-09
- * Changed:         2023-05-17
+ * Changed:         2024-05-31
  *
  * */
 
@@ -11,14 +11,13 @@
 #define LS_STD_BOOLEAN_HPP
 
 #include <ls-std/core/Class.hpp>
+#include <ls-std/core/definition.hpp>
 #include <ls-std/core/interface/IBoxing.hpp>
-#include <ls-std/os/dynamic-goal.hpp>
-#include <memory>
 #include <sstream>
 
 namespace ls::std::boxing
 {
-  class LS_STD_DYNAMIC_GOAL Boolean : public ls::std::core::Class, public ls::std::core::interface_type::IBoxing
+  ls_std_class Boolean final : public core::Class, public core::interface_type::IBoxing
   {
     public:
 
@@ -28,12 +27,12 @@ namespace ls::std::boxing
 
       // assignment operators
 
-      ls::std::boxing::Boolean &operator=(int _value);
-      ls::std::boxing::Boolean &operator=(bool _value);
+      Boolean &operator=(int _value);
+      Boolean &operator=(bool _value);
 
       // stream operators
 
-      friend ::std::ostream &operator<<(::std::ostream &_outputStream, const ls::std::boxing::Boolean &_boolean)
+      friend ::std::ostream &operator<<(::std::ostream &_outputStream, const Boolean &_boolean)
       {
         _outputStream << _boolean._toString();
         return _outputStream;
@@ -41,15 +40,15 @@ namespace ls::std::boxing
 
       // logical operators
 
-      friend bool operator!(const ls::std::boxing::Boolean &_boolean)
+      friend bool operator!(const Boolean &_boolean)
       {
         return !_boolean.value;
       }
 
-      bool operator&&(const ls::std::boxing::Boolean &_boolean) const;
+      bool operator&&(const Boolean &_boolean) const;
       bool operator&&(bool _value) const;
       bool operator&&(int _value) const;
-      bool operator||(const ls::std::boxing::Boolean &_boolean) const;
+      bool operator||(const Boolean &_boolean) const;
       bool operator||(bool _value) const;
       bool operator||(int _value) const;
       // INFO: operator ^ can not be taken for XOR, since it's not possible to implement it respecting commutative law
@@ -62,9 +61,9 @@ namespace ls::std::boxing
       // additional functionality
 
       [[nodiscard]] bool getValue() const;
-      [[nodiscard]] static bool XOR(const ls::std::boxing::Boolean &_leftExpression, const ls::std::boxing::Boolean &_rightExpression);
-      [[nodiscard]] static bool XOR(const ls::std::boxing::Boolean &_leftExpression, bool _rightExpression);
-      [[nodiscard]] static bool XOR(bool _leftExpression, const ls::std::boxing::Boolean &_rightExpression);
+      [[nodiscard]] static bool XOR(const Boolean &_leftExpression, const Boolean &_rightExpression);
+      [[nodiscard]] static bool XOR(const Boolean &_leftExpression, bool _rightExpression);
+      [[nodiscard]] static bool XOR(bool _leftExpression, const Boolean &_rightExpression);
       [[nodiscard]] static bool XOR(bool _leftExpression, bool _rightExpression);
 
     private:

+ 22 - 23
include/ls-std/boxing/Double.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-14
- * Changed:         2023-05-17
+ * Changed:         2024-05-31
  *
  * */
 
@@ -11,13 +11,12 @@
 #define LS_STD_DOUBLE_HPP
 
 #include <ls-std/core/Class.hpp>
+#include <ls-std/core/definition.hpp>
 #include <ls-std/core/interface/IBoxing.hpp>
-#include <ls-std/os/dynamic-goal.hpp>
-#include <memory>
 
 namespace ls::std::boxing
 {
-  class LS_STD_DYNAMIC_GOAL Double : public ls::std::core::Class, public ls::std::core::interface_type::IBoxing
+  ls_std_class Double final : public core::Class, public core::interface_type::IBoxing
   {
     public:
 
@@ -27,44 +26,44 @@ namespace ls::std::boxing
 
       // assignment operators
 
-      ls::std::boxing::Double &operator=(double _value);
+      Double &operator=(double _value);
 
       // arithmetic operators
 
       double operator-() const;
-      double operator+(const ls::std::boxing::Double &_double) const;
+      double operator+(const Double &_double) const;
       double operator+(double _value) const;
-      double operator*(const ls::std::boxing::Double &_double) const;
+      double operator*(const Double &_double) const;
       double operator*(double _value) const;
-      double operator-(const ls::std::boxing::Double &_double) const;
+      double operator-(const Double &_double) const;
       double operator-(double _value) const;
-      double operator/(const ls::std::boxing::Double &_double) const;
+      double operator/(const Double &_double) const;
       double operator/(double _value) const;
 
       // compound operators
 
-      ls::std::boxing::Double &operator+=(const ls::std::boxing::Double &_double);
-      ls::std::boxing::Double &operator+=(double _value);
-      ls::std::boxing::Double &operator-=(const ls::std::boxing::Double &_double);
-      ls::std::boxing::Double &operator-=(double _value);
-      ls::std::boxing::Double &operator*=(const ls::std::boxing::Double &_double);
-      ls::std::boxing::Double &operator*=(double _value);
-      ls::std::boxing::Double &operator/=(const ls::std::boxing::Double &_double);
-      ls::std::boxing::Double &operator/=(double _value);
+      Double &operator+=(const Double &_double);
+      Double &operator+=(double _value);
+      Double &operator-=(const Double &_double);
+      Double &operator-=(double _value);
+      Double &operator*=(const Double &_double);
+      Double &operator*=(double _value);
+      Double &operator/=(const Double &_double);
+      Double &operator/=(double _value);
 
       // comparison operators
 
-      bool operator==(const ls::std::boxing::Double &_double) const;
+      bool operator==(const Double &_double) const;
       bool operator==(double _value) const;
-      bool operator!=(const ls::std::boxing::Double &_double) const;
+      bool operator!=(const Double &_double) const;
       bool operator!=(double _value) const;
-      bool operator>(const ls::std::boxing::Double &_double) const;
+      bool operator>(const Double &_double) const;
       bool operator>(double _value) const;
-      bool operator>=(const ls::std::boxing::Double &_double) const;
+      bool operator>=(const Double &_double) const;
       bool operator>=(double _value) const;
-      bool operator<(const ls::std::boxing::Double &_double) const;
+      bool operator<(const Double &_double) const;
       bool operator<(double _value) const;
-      bool operator<=(const ls::std::boxing::Double &_double) const;
+      bool operator<=(const Double &_double) const;
       bool operator<=(double _value) const;
 
       // increment / decrement operator

+ 22 - 23
include/ls-std/boxing/Float.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-14
- * Changed:         2023-05-17
+ * Changed:         2024-05-31
  *
  * */
 
@@ -11,14 +11,13 @@
 #define LS_STD_FLOAT_HPP
 
 #include <ls-std/core/Class.hpp>
+#include <ls-std/core/definition.hpp>
 #include <ls-std/core/interface/IBoxing.hpp>
-#include <ls-std/os/dynamic-goal.hpp>
-#include <memory>
 #include <string>
 
 namespace ls::std::boxing
 {
-  class LS_STD_DYNAMIC_GOAL Float : public ls::std::core::Class, public ls::std::core::interface_type::IBoxing
+  ls_std_class Float final : public core::Class, public core::interface_type::IBoxing
   {
     public:
 
@@ -28,44 +27,44 @@ namespace ls::std::boxing
 
       // assignment operators
 
-      ls::std::boxing::Float &operator=(float _value);
+      Float &operator=(float _value);
 
       // arithmetic operators
 
       float operator-() const;
-      float operator+(const ls::std::boxing::Float &_float) const;
+      float operator+(const Float &_float) const;
       float operator+(float _value) const;
-      float operator*(const ls::std::boxing::Float &_float) const;
+      float operator*(const Float &_float) const;
       float operator*(float _value) const;
-      float operator-(const ls::std::boxing::Float &_float) const;
+      float operator-(const Float &_float) const;
       float operator-(float _value) const;
-      float operator/(const ls::std::boxing::Float &_float) const;
+      float operator/(const Float &_float) const;
       float operator/(float _value) const;
 
       // compound operators
 
-      ls::std::boxing::Float &operator+=(const ls::std::boxing::Float &_float);
-      ls::std::boxing::Float &operator+=(float _value);
-      ls::std::boxing::Float &operator-=(const ls::std::boxing::Float &_float);
-      ls::std::boxing::Float &operator-=(float _value);
-      ls::std::boxing::Float &operator*=(const ls::std::boxing::Float &_float);
-      ls::std::boxing::Float &operator*=(float _value);
-      ls::std::boxing::Float &operator/=(const ls::std::boxing::Float &_float);
-      ls::std::boxing::Float &operator/=(float _value);
+      Float &operator+=(const Float &_float);
+      Float &operator+=(float _value);
+      Float &operator-=(const Float &_float);
+      Float &operator-=(float _value);
+      Float &operator*=(const Float &_float);
+      Float &operator*=(float _value);
+      Float &operator/=(const Float &_float);
+      Float &operator/=(float _value);
 
       // comparison operators
 
-      bool operator==(const ls::std::boxing::Float &_float) const;
+      bool operator==(const Float &_float) const;
       bool operator==(float _value) const;
-      bool operator!=(const ls::std::boxing::Float &_float) const;
+      bool operator!=(const Float &_float) const;
       bool operator!=(float _value) const;
-      bool operator>(const ls::std::boxing::Float &_float) const;
+      bool operator>(const Float &_float) const;
       bool operator>(float _value) const;
-      bool operator>=(const ls::std::boxing::Float &_float) const;
+      bool operator>=(const Float &_float) const;
       bool operator>=(float _value) const;
-      bool operator<(const ls::std::boxing::Float &_float) const;
+      bool operator<(const Float &_float) const;
       bool operator<(float _value) const;
-      bool operator<=(const ls::std::boxing::Float &_float) const;
+      bool operator<=(const Float &_float) const;
       bool operator<=(float _value) const;
 
       // increment / decrement operator

+ 24 - 25
include/ls-std/boxing/Integer.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-07
- * Changed:         2023-05-17
+ * Changed:         2024-05-31
  *
  * */
 
@@ -11,13 +11,12 @@
 #define LS_STD_INTEGER_HPP
 
 #include <ls-std/core/Class.hpp>
+#include <ls-std/core/definition.hpp>
 #include <ls-std/core/interface/IBoxing.hpp>
-#include <ls-std/os/dynamic-goal.hpp>
-#include <memory>
 
 namespace ls::std::boxing
 {
-  class LS_STD_DYNAMIC_GOAL Integer : public ls::std::core::Class, public ls::std::core::interface_type::IBoxing
+  ls_std_class Integer final : public core::Class, public core::interface_type::IBoxing
   {
     public:
 
@@ -27,51 +26,51 @@ namespace ls::std::boxing
 
       // assignment operators
 
-      ls::std::boxing::Integer &operator=(int _value);
+      Integer &operator=(int _value);
 
       // arithmetic operators
 
       int operator-() const;
-      int operator+(const ls::std::boxing::Integer &_integer) const;
+      int operator+(const Integer &_integer) const;
       int operator+(int _value) const;
-      int operator*(const ls::std::boxing::Integer &_integer) const;
+      int operator*(const Integer &_integer) const;
       int operator*(int _value) const;
-      int operator-(const ls::std::boxing::Integer &_integer) const;
+      int operator-(const Integer &_integer) const;
       int operator-(int _value) const;
-      int operator/(const ls::std::boxing::Integer &_integer) const;
+      int operator/(const Integer &_integer) const;
       int operator/(int _value) const;
-      int operator%(const ls::std::boxing::Integer &_integer) const;
+      int operator%(const Integer &_integer) const;
       int operator%(int _value) const;
 
       // compound operators
 
-      ls::std::boxing::Integer &operator+=(const ls::std::boxing::Integer &_integer);
-      ls::std::boxing::Integer &operator+=(int _value);
-      ls::std::boxing::Integer &operator-=(const ls::std::boxing::Integer &_integer);
-      ls::std::boxing::Integer &operator-=(int _value);
-      ls::std::boxing::Integer &operator*=(const ls::std::boxing::Integer &_integer);
-      ls::std::boxing::Integer &operator*=(int _value);
-      ls::std::boxing::Integer &operator/=(const ls::std::boxing::Integer &_integer);
-      ls::std::boxing::Integer &operator/=(int _value);
+      Integer &operator+=(const Integer &_integer);
+      Integer &operator+=(int _value);
+      Integer &operator-=(const Integer &_integer);
+      Integer &operator-=(int _value);
+      Integer &operator*=(const Integer &_integer);
+      Integer &operator*=(int _value);
+      Integer &operator/=(const Integer &_integer);
+      Integer &operator/=(int _value);
 
       // comparison operators
 
-      bool operator==(const ls::std::boxing::Integer &_integer) const;
+      bool operator==(const Integer &_integer) const;
       bool operator==(int _value) const;
-      bool operator!=(const ls::std::boxing::Integer &_integer) const;
+      bool operator!=(const Integer &_integer) const;
       bool operator!=(int _value) const;
-      bool operator>(const ls::std::boxing::Integer &_integer) const;
+      bool operator>(const Integer &_integer) const;
       bool operator>(int _value) const;
-      bool operator>=(const ls::std::boxing::Integer &_integer) const;
+      bool operator>=(const Integer &_integer) const;
       bool operator>=(int _value) const;
-      bool operator<(const ls::std::boxing::Integer &_integer) const;
+      bool operator<(const Integer &_integer) const;
       bool operator<(int _value) const;
-      bool operator<=(const ls::std::boxing::Integer &_integer) const;
+      bool operator<=(const Integer &_integer) const;
       bool operator<=(int _value) const;
 
       // logical operators
 
-      friend bool operator!(const ls::std::boxing::Integer &_integer)
+      friend bool operator!(const Integer &_integer)
       {
         return !_integer.value;
       }

+ 39 - 40
include/ls-std/boxing/Long.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2023-05-17
+ * Changed:         2024-05-31
  *
  * */
 
@@ -11,68 +11,67 @@
 #define LS_STD_LONG_HPP
 
 #include <ls-std/core/Class.hpp>
+#include <ls-std/core/definition.hpp>
 #include <ls-std/core/interface/IBoxing.hpp>
 #include <ls-std/core/type/Types.hpp>
-#include <ls-std/os/dynamic-goal.hpp>
-#include <memory>
 
 namespace ls::std::boxing
 {
-  class LS_STD_DYNAMIC_GOAL Long : public ls::std::core::Class, public ls::std::core::interface_type::IBoxing
+  ls_std_class Long final : public core::Class, public core::interface_type::IBoxing
   {
     public:
 
-      explicit Long(ls::std::core::type::long_type _value);
+      explicit Long(core::type::long_type _value);
       Long();
       ~Long() noexcept override;
 
       // assignment operators
 
-      ls::std::boxing::Long &operator=(ls::std::core::type::long_type _value);
+      Long &operator=(core::type::long_type _value);
 
       // arithmetic operators
 
-      ls::std::core::type::long_type operator-() const;
-      ls::std::core::type::long_type operator+(const ls::std::boxing::Long &_long) const;
-      ls::std::core::type::long_type operator+(ls::std::core::type::long_type _value) const;
-      ls::std::core::type::long_type operator*(const ls::std::boxing::Long &_long) const;
-      ls::std::core::type::long_type operator*(ls::std::core::type::long_type _value) const;
-      ls::std::core::type::long_type operator-(const ls::std::boxing::Long &_long) const;
-      ls::std::core::type::long_type operator-(ls::std::core::type::long_type _value) const;
-      ls::std::core::type::long_type operator/(const ls::std::boxing::Long &_long) const;
-      ls::std::core::type::long_type operator/(ls::std::core::type::long_type _value) const;
-      ls::std::core::type::long_type operator%(const ls::std::boxing::Long &_long) const;
-      ls::std::core::type::long_type operator%(ls::std::core::type::long_type _value) const;
+      core::type::long_type operator-() const;
+      core::type::long_type operator+(const Long &_long) const;
+      core::type::long_type operator+(core::type::long_type _value) const;
+      core::type::long_type operator*(const Long &_long) const;
+      core::type::long_type operator*(core::type::long_type _value) const;
+      core::type::long_type operator-(const Long &_long) const;
+      core::type::long_type operator-(core::type::long_type _value) const;
+      core::type::long_type operator/(const Long &_long) const;
+      core::type::long_type operator/(core::type::long_type _value) const;
+      core::type::long_type operator%(const Long &_long) const;
+      core::type::long_type operator%(core::type::long_type _value) const;
 
       // compound operators
 
-      ls::std::boxing::Long &operator+=(const ls::std::boxing::Long &_long);
-      ls::std::boxing::Long &operator+=(ls::std::core::type::long_type _value);
-      ls::std::boxing::Long &operator-=(const ls::std::boxing::Long &_long);
-      ls::std::boxing::Long &operator-=(ls::std::core::type::long_type _value);
-      ls::std::boxing::Long &operator*=(const ls::std::boxing::Long &_long);
-      ls::std::boxing::Long &operator*=(ls::std::core::type::long_type _value);
-      ls::std::boxing::Long &operator/=(const ls::std::boxing::Long &_long);
-      ls::std::boxing::Long &operator/=(ls::std::core::type::long_type _value);
+      Long &operator+=(const Long &_long);
+      Long &operator+=(core::type::long_type _value);
+      Long &operator-=(const Long &_long);
+      Long &operator-=(core::type::long_type _value);
+      Long &operator*=(const Long &_long);
+      Long &operator*=(core::type::long_type _value);
+      Long &operator/=(const Long &_long);
+      Long &operator/=(core::type::long_type _value);
 
       // comparison operators
 
-      bool operator==(const ls::std::boxing::Long &_long) const;
-      bool operator==(ls::std::core::type::long_type _value) const;
-      bool operator!=(const ls::std::boxing::Long &_long) const;
-      bool operator!=(ls::std::core::type::long_type _value) const;
-      bool operator>(const ls::std::boxing::Long &_long) const;
-      bool operator>(ls::std::core::type::long_type _value) const;
-      bool operator>=(const ls::std::boxing::Long &_long) const;
-      bool operator>=(ls::std::core::type::long_type _value) const;
-      bool operator<(const ls::std::boxing::Long &_long) const;
-      bool operator<(ls::std::core::type::long_type _value) const;
-      bool operator<=(const ls::std::boxing::Long &_long) const;
-      bool operator<=(ls::std::core::type::long_type _value) const;
+      bool operator==(const Long &_long) const;
+      bool operator==(core::type::long_type _value) const;
+      bool operator!=(const Long &_long) const;
+      bool operator!=(core::type::long_type _value) const;
+      bool operator>(const Long &_long) const;
+      bool operator>(core::type::long_type _value) const;
+      bool operator>=(const Long &_long) const;
+      bool operator>=(core::type::long_type _value) const;
+      bool operator<(const Long &_long) const;
+      bool operator<(core::type::long_type _value) const;
+      bool operator<=(const Long &_long) const;
+      bool operator<=(core::type::long_type _value) const;
 
       // logical operators
 
-      friend bool operator!(const ls::std::boxing::Long &_long)
+      friend bool operator!(const Long &_long)
       {
         return !_long.value;
       }
@@ -89,11 +88,11 @@ namespace ls::std::boxing
 
       // additional functionality
 
-      [[nodiscard]] ls::std::core::type::long_type getValue() const;
+      [[nodiscard]] core::type::long_type getValue() const;
 
     private:
 
-      ls::std::core::type::long_type value{};
+      core::type::long_type value{};
 
       [[nodiscard]] static ::std::string _fetchClassName();
   };

+ 11 - 12
include/ls-std/boxing/String.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-14
- * Changed:         2023-05-17
+ * Changed:         2024-05-31
  *
  * */
 
@@ -11,17 +11,16 @@
 #define LS_STD_STRING_HPP
 
 #include <ls-std/core/Class.hpp>
+#include <ls-std/core/definition.hpp>
 #include <ls-std/core/interface/IBoxing.hpp>
 #include <ls-std/core/type/Types.hpp>
-#include <ls-std/os/dynamic-goal.hpp>
-#include <memory>
 #include <string>
 #include <string_view>
 #include <vector>
 
 namespace ls::std::boxing
 {
-  class LS_STD_DYNAMIC_GOAL String : public ls::std::core::Class, public ls::std::core::interface_type::IBoxing
+  ls_std_class String final : public core::Class, public core::interface_type::IBoxing
   {
     public:
 
@@ -31,26 +30,26 @@ namespace ls::std::boxing
 
       // assignment operators
 
-      ls::std::boxing::String &operator=(::std::string _value);
+      String &operator=(::std::string _value);
 
       // arithmetic operators
 
-      ::std::string operator+(ls::std::boxing::String _string) const;
+      ::std::string operator+(String _string) const;
       ::std::string operator+(const ::std::string &_string) const;
       ::std::string operator+(const char *_string) const;
       ::std::string operator-(int _number) const;
 
       // compound operators
 
-      ls::std::boxing::String &operator+=(ls::std::boxing::String _string);
-      ls::std::boxing::String &operator+=(const ::std::string &_text);
+      String &operator+=(String _string);
+      String &operator+=(const ::std::string &_text);
 
       // comparison operators
 
-      bool operator==(ls::std::boxing::String _string) const;
+      bool operator==(String _string) const;
       bool operator==(::std::string_view _value) const;
       bool operator==(const char *_value) const;
-      bool operator!=(ls::std::boxing::String _string) const;
+      bool operator!=(String _string) const;
       bool operator!=(::std::string_view _value) const;
       bool operator!=(const char *_value) const;
 
@@ -63,9 +62,9 @@ namespace ls::std::boxing
 
       [[nodiscard]] bool contains(::std::string_view _text) const;
       [[nodiscard]] bool endsWith(::std::string_view _text) const;
-      [[nodiscard]] bool equalsIgnoreCase(const ls::std::boxing::String &_string) const;
+      [[nodiscard]] bool equalsIgnoreCase(const String &_string) const;
       [[nodiscard]] bool equalsIgnoreCase(::std::string _text) const;
-      [[nodiscard]] ::std::vector<ls::std::core::type::byte_type> getByteData();
+      [[nodiscard]] ::std::vector<core::type::byte_type> getByteData();
       [[nodiscard]] ::std::string padLeft(size_t _width, char _fillCharacter) const;
       [[nodiscard]] ::std::string padRight(size_t _width, char _fillCharacter) const;
       [[nodiscard]] ::std::string reverse() const;

+ 22 - 0
include/ls-std/core/definition.hpp

@@ -0,0 +1,22 @@
+/*
+* Author:          Patrick-Christopher Mattulat
+ * Company:         Lynar Studios
+ * E-Mail:          webmaster@lynarstudios.com
+ * Created:         2024-05-31
+ * Changed:         2024-05-31
+ *
+ * */
+
+#ifndef LS_STD_DEFINITION_HPP
+#define LS_STD_DEFINITION_HPP
+
+#if defined(_WIN32) && defined(_MSC_VER)
+  #define LS_STD_CLASS class __declspec(dllexport)
+#endif
+#if defined(unix) || defined(__APPLE__) || defined(_WIN32) && defined(__GNUC__)
+  #define LS_STD_CLASS class
+#endif
+
+#define ls_std_class LS_STD_CLASS
+
+#endif

+ 2 - 1
include/ls-std/ls-std-core.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2022-05-13
- * Changed:         2024-05-17
+ * Changed:         2024-05-31
  *
  * */
 
@@ -43,6 +43,7 @@
 
 #include <ls-std/core/Class.hpp>
 #include <ls-std/core/ConditionalFunctionExecutor.hpp>
+#include <ls-std/core/definition.hpp>
 #include <ls-std/core/LibraryVersion.hpp>
 #include <ls-std/core/Version.hpp>
 

+ 12 - 12
source/ls-std/boxing/Boolean.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-09
- * Changed:         2023-05-17
+ * Changed:         2024-05-31
  *
  * */
 
@@ -17,21 +17,21 @@ using ls::std::core::IllegalArgumentException;
 using std::string;
 using std::transform;
 
-Boolean::Boolean(bool _value) : Class(Boolean::_fetchClassName()), value(_value)
+Boolean::Boolean(const bool _value) : Class(_fetchClassName()), value(_value)
 {}
 
-Boolean::Boolean() : Class(Boolean::_fetchClassName())
+Boolean::Boolean() : Class(_fetchClassName())
 {}
 
 Boolean::~Boolean() noexcept = default;
 
-Boolean &Boolean::operator=(int _value)
+Boolean &Boolean::operator=(const int _value)
 {
   this->value = _value;
   return *this;
 }
 
-Boolean &Boolean::operator=(bool _value)
+Boolean &Boolean::operator=(const bool _value)
 {
   this->value = _value;
   return *this;
@@ -42,12 +42,12 @@ bool Boolean::operator&&(const Boolean &_boolean) const
   return this->value && _boolean.getValue();
 }
 
-bool Boolean::operator&&(bool _value) const
+bool Boolean::operator&&(const bool _value) const
 {
   return this->value && _value;
 }
 
-bool Boolean::operator&&(int _value) const
+bool Boolean::operator&&(const int _value) const
 {
   return this->value && _value;
 }
@@ -57,12 +57,12 @@ bool Boolean::operator||(const Boolean &_boolean) const
   return this->value || _boolean.getValue();
 }
 
-bool Boolean::operator||(bool _value) const
+bool Boolean::operator||(const bool _value) const
 {
   return this->value || _value;
 }
 
-bool Boolean::operator||(int _value) const
+bool Boolean::operator||(const int _value) const
 {
   return this->value || _value;
 }
@@ -105,17 +105,17 @@ bool Boolean::XOR(const Boolean &_leftExpression, const Boolean &_rightExpressio
   return (_leftExpression && !_rightExpression) || (!_leftExpression && _rightExpression.getValue());
 }
 
-bool Boolean::XOR(const Boolean &_leftExpression, bool _rightExpression)
+bool Boolean::XOR(const Boolean &_leftExpression, const bool _rightExpression)
 {
   return (_leftExpression && !_rightExpression) || (!_leftExpression && _rightExpression);
 }
 
-bool Boolean::XOR(bool _leftExpression, const Boolean &_rightExpression)
+bool Boolean::XOR(const bool _leftExpression, const Boolean &_rightExpression)
 {
   return (_leftExpression && !_rightExpression) || (!_leftExpression && _rightExpression.getValue());
 }
 
-bool Boolean::XOR(bool _leftExpression, bool _rightExpression)
+bool Boolean::XOR(const bool _leftExpression, const bool _rightExpression)
 {
   return (_leftExpression && !_rightExpression) || (!_leftExpression && _rightExpression);
 }

+ 20 - 20
source/ls-std/boxing/Double.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-14
- * Changed:         2023-05-17
+ * Changed:         2024-05-31
  *
  * */
 
@@ -19,19 +19,19 @@ using std::stod;
 using std::string;
 using std::to_string;
 
-Double::Double() : Class(Double::_fetchClassName())
+Double::Double() : Class(_fetchClassName())
 {
   this->_assignEpsilon(0.00000001);
 }
 
-Double::Double(double _value) : Class(Double::_fetchClassName()), value(_value)
+Double::Double(const double _value) : Class(_fetchClassName()), value(_value)
 {
   this->_assignEpsilon(0.00000001);
 }
 
 Double::~Double() noexcept = default;
 
-Double &Double::operator=(double _value)
+Double &Double::operator=(const double _value)
 {
   this->value = _value;
   return *this;
@@ -47,7 +47,7 @@ double Double::operator+(const Double &_double) const
   return this->value + _double.getValue();
 }
 
-double Double::operator+(double _value) const
+double Double::operator+(const double _value) const
 {
   return this->value + _value;
 }
@@ -57,7 +57,7 @@ double Double::operator*(const Double &_double) const
   return this->value * _double.getValue();
 }
 
-double Double::operator*(double _value) const
+double Double::operator*(const double _value) const
 {
   return this->value * _value;
 }
@@ -67,7 +67,7 @@ double Double::operator-(const Double &_double) const
   return this->value - _double.getValue();
 }
 
-double Double::operator-(double _value) const
+double Double::operator-(const double _value) const
 {
   return this->value - _value;
 }
@@ -77,7 +77,7 @@ double Double::operator/(const Double &_double) const
   return this->value / _double.getValue();
 }
 
-double Double::operator/(double _value) const
+double Double::operator/(const double _value) const
 {
   return this->value / _value;
 }
@@ -88,7 +88,7 @@ Double &Double::operator+=(const Double &_double)
   return *this;
 }
 
-Double &Double::operator+=(double _value)
+Double &Double::operator+=(const double _value)
 {
   this->value += _value;
   return *this;
@@ -100,7 +100,7 @@ Double &Double::operator-=(const Double &_double)
   return *this;
 }
 
-Double &Double::operator-=(double _value)
+Double &Double::operator-=(const double _value)
 {
   this->value -= _value;
   return *this;
@@ -112,7 +112,7 @@ Double &Double::operator*=(const Double &_double)
   return *this;
 }
 
-Double &Double::operator*=(double _value)
+Double &Double::operator*=(const double _value)
 {
   this->value *= _value;
   return *this;
@@ -124,7 +124,7 @@ Double &Double::operator/=(const Double &_double)
   return *this;
 }
 
-Double &Double::operator/=(double _value)
+Double &Double::operator/=(const double _value)
 {
   this->value /= _value;
   return *this;
@@ -135,7 +135,7 @@ bool Double::operator==(const Double &_double) const
   return fabs(this->value - _double.getValue()) < this->epsilon;
 }
 
-bool Double::operator==(double _value) const
+bool Double::operator==(const double _value) const
 {
   return fabs(this->value - _value) < this->epsilon;
 }
@@ -145,7 +145,7 @@ bool Double::operator!=(const Double &_double) const
   return fabs(this->value - _double.getValue()) >= this->epsilon;
 }
 
-bool Double::operator!=(double _value) const
+bool Double::operator!=(const double _value) const
 {
   return fabs(this->value - _value) >= this->epsilon;
 }
@@ -155,7 +155,7 @@ bool Double::operator>(const Double &_double) const
   return this->value > _double.getValue();
 }
 
-bool Double::operator>(double _value) const
+bool Double::operator>(const double _value) const
 {
   return this->value > _value;
 }
@@ -165,7 +165,7 @@ bool Double::operator>=(const Double &_double) const
   return this->value >= _double.getValue();
 }
 
-bool Double::operator>=(double _value) const
+bool Double::operator>=(const double _value) const
 {
   return this->value >= _value;
 }
@@ -175,7 +175,7 @@ bool Double::operator<(const Double &_double) const
   return this->value < _double.getValue();
 }
 
-bool Double::operator<(double _value) const
+bool Double::operator<(const double _value) const
 {
   return this->value < _value;
 }
@@ -185,7 +185,7 @@ bool Double::operator<=(const Double &_double) const
   return this->value <= _double.getValue();
 }
 
-bool Double::operator<=(double _value) const
+bool Double::operator<=(const double _value) const
 {
   return this->value <= _value;
 }
@@ -220,12 +220,12 @@ double Double::getValue() const
   return this->value;
 }
 
-void Double::setEpsilon(double _epsilon)
+void Double::setEpsilon(const double _epsilon)
 {
   this->_assignEpsilon(_epsilon);
 }
 
-void Double::_assignEpsilon(double _epsilon)
+void Double::_assignEpsilon(const double _epsilon)
 {
   if (_epsilon <= 0.0)
   {

+ 20 - 20
source/ls-std/boxing/Float.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-14
- * Changed:         2023-05-17
+ * Changed:         2024-05-31
  *
  * */
 
@@ -19,15 +19,15 @@ using std::stof;
 using std::string;
 using std::to_string;
 
-Float::Float() : Class(Float::_fetchClassName()), epsilon(0.00001F)
+Float::Float() : Class(_fetchClassName()), epsilon(0.00001F)
 {}
 
-Float::Float(float _value) : Class(Float::_fetchClassName()), epsilon(0.00001f), value(_value)
+Float::Float(const float _value) : Class(_fetchClassName()), epsilon(0.00001f), value(_value)
 {}
 
 Float::~Float() noexcept = default;
 
-Float &Float::operator=(float _value)
+Float &Float::operator=(const float _value)
 {
   this->value = _value;
   return *this;
@@ -43,7 +43,7 @@ float Float::operator+(const Float &_float) const
   return this->value + _float.getValue();
 }
 
-float Float::operator+(float _value) const
+float Float::operator+(const float _value) const
 {
   return this->value + _value;
 }
@@ -53,7 +53,7 @@ float Float::operator*(const Float &_float) const
   return this->value * _float.getValue();
 }
 
-float Float::operator*(float _value) const
+float Float::operator*(const float _value) const
 {
   return this->value * _value;
 }
@@ -63,7 +63,7 @@ float Float::operator-(const Float &_float) const
   return this->value - _float.getValue();
 }
 
-float Float::operator-(float _value) const
+float Float::operator-(const float _value) const
 {
   return this->value - _value;
 }
@@ -73,7 +73,7 @@ float Float::operator/(const Float &_float) const
   return this->value / _float.getValue();
 }
 
-float Float::operator/(float _value) const
+float Float::operator/(const float _value) const
 {
   return this->value / _value;
 }
@@ -84,7 +84,7 @@ Float &Float::operator+=(const Float &_float)
   return *this;
 }
 
-Float &Float::operator+=(float _value)
+Float &Float::operator+=(const float _value)
 {
   this->value += _value;
   return *this;
@@ -96,7 +96,7 @@ Float &Float::operator-=(const Float &_float)
   return *this;
 }
 
-Float &Float::operator-=(float _value)
+Float &Float::operator-=(const float _value)
 {
   this->value -= _value;
   return *this;
@@ -108,7 +108,7 @@ Float &Float::operator*=(const Float &_float)
   return *this;
 }
 
-Float &Float::operator*=(float _value)
+Float &Float::operator*=(const float _value)
 {
   this->value *= _value;
   return *this;
@@ -120,7 +120,7 @@ Float &Float::operator/=(const Float &_float)
   return *this;
 }
 
-Float &Float::operator/=(float _value)
+Float &Float::operator/=(const float _value)
 {
   this->value /= _value;
   return *this;
@@ -131,7 +131,7 @@ bool Float::operator==(const Float &_float) const
   return fabs(this->value - _float.getValue()) < this->epsilon;
 }
 
-bool Float::operator==(float _value) const
+bool Float::operator==(const float _value) const
 {
   return fabs(this->value - _value) < this->epsilon;
 }
@@ -141,7 +141,7 @@ bool Float::operator!=(const Float &_float) const
   return fabs(this->value - _float.getValue()) >= this->epsilon;
 }
 
-bool Float::operator!=(float _value) const
+bool Float::operator!=(const float _value) const
 {
   return fabs(this->value - _value) >= this->epsilon;
 }
@@ -151,7 +151,7 @@ bool Float::operator>(const Float &_float) const
   return this->value > _float.getValue();
 }
 
-bool Float::operator>(float _value) const
+bool Float::operator>(const float _value) const
 {
   return this->value > _value;
 }
@@ -161,7 +161,7 @@ bool Float::operator>=(const Float &_float) const
   return this->value >= _float.getValue();
 }
 
-bool Float::operator>=(float _value) const
+bool Float::operator>=(const float _value) const
 {
   return this->value >= _value;
 }
@@ -171,7 +171,7 @@ bool Float::operator<(const Float &_float) const
   return this->value < _float.getValue();
 }
 
-bool Float::operator<(float _value) const
+bool Float::operator<(const float _value) const
 {
   return this->value < _value;
 }
@@ -181,7 +181,7 @@ bool Float::operator<=(const Float &_float) const
   return this->value <= _float.getValue();
 }
 
-bool Float::operator<=(float _value) const
+bool Float::operator<=(const float _value) const
 {
   return this->value <= _value;
 }
@@ -216,12 +216,12 @@ float Float::getValue() const
   return this->value;
 }
 
-void Float::setEpsilon(float _epsilon)
+void Float::setEpsilon(const float _epsilon)
 {
   this->_assignEpsilon(_epsilon);
 }
 
-void Float::_assignEpsilon(float _epsilon)
+void Float::_assignEpsilon(const float _epsilon)
 {
   if (_epsilon <= 0.0)
   {

+ 19 - 19
source/ls-std/boxing/Integer.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-07
- * Changed:         2023-05-17
+ * Changed:         2024-05-31
  *
  * */
 
@@ -17,15 +17,15 @@ using std::stoi;
 using std::string;
 using std::to_string;
 
-Integer::Integer(int _value) : Class(Integer::_fetchClassName()), value(_value)
+Integer::Integer(const int _value) : Class(_fetchClassName()), value(_value)
 {}
 
-Integer::Integer() : Class(Integer::_fetchClassName())
+Integer::Integer() : Class(_fetchClassName())
 {}
 
 Integer::~Integer() noexcept = default;
 
-Integer &Integer::operator=(int _value)
+Integer &Integer::operator=(const int _value)
 {
   this->value = _value;
   return *this;
@@ -41,7 +41,7 @@ int Integer::operator+(const Integer &_integer) const
   return this->value + _integer.getValue();
 }
 
-int Integer::operator+(int _value) const
+int Integer::operator+(const int _value) const
 {
   return this->value + _value;
 }
@@ -51,7 +51,7 @@ int Integer::operator*(const Integer &_integer) const
   return this->value * _integer.getValue();
 }
 
-int Integer::operator*(int _value) const
+int Integer::operator*(const int _value) const
 {
   return this->value * _value;
 }
@@ -61,7 +61,7 @@ int Integer::operator-(const Integer &_integer) const
   return this->value - _integer.getValue();
 }
 
-int Integer::operator-(int _value) const
+int Integer::operator-(const int _value) const
 {
   return this->value - _value;
 }
@@ -76,7 +76,7 @@ int Integer::operator/(const Integer &_integer) const
   return this->value / _integer.getValue();
 }
 
-int Integer::operator/(int _value) const
+int Integer::operator/(const int _value) const
 {
   if (_value == 0)
   {
@@ -91,7 +91,7 @@ int Integer::operator%(const Integer &_integer) const
   return this->value % _integer.getValue();
 }
 
-int Integer::operator%(int _value) const
+int Integer::operator%(const int _value) const
 {
   return this->value % _value;
 }
@@ -102,7 +102,7 @@ Integer &Integer::operator+=(const Integer &_integer)
   return *this;
 }
 
-Integer &Integer::operator+=(int _value)
+Integer &Integer::operator+=(const int _value)
 {
   this->value += _value;
   return *this;
@@ -114,7 +114,7 @@ Integer &Integer::operator-=(const Integer &_integer)
   return *this;
 }
 
-Integer &Integer::operator-=(int _value)
+Integer &Integer::operator-=(const int _value)
 {
   this->value -= _value;
   return *this;
@@ -126,7 +126,7 @@ Integer &Integer::operator*=(const Integer &_integer)
   return *this;
 }
 
-Integer &Integer::operator*=(int _value)
+Integer &Integer::operator*=(const int _value)
 {
   this->value *= _value;
   return *this;
@@ -143,7 +143,7 @@ Integer &Integer::operator/=(const Integer &_integer)
   return *this;
 }
 
-Integer &Integer::operator/=(int _value)
+Integer &Integer::operator/=(const int _value)
 {
   if (_value == 0)
   {
@@ -159,7 +159,7 @@ bool Integer::operator==(const Integer &_integer) const
   return this->value == _integer.getValue();
 }
 
-bool Integer::operator==(int _value) const
+bool Integer::operator==(const int _value) const
 {
   return this->value == _value;
 }
@@ -169,7 +169,7 @@ bool Integer::operator!=(const Integer &_integer) const
   return this->value != _integer.getValue();
 }
 
-bool Integer::operator!=(int _value) const
+bool Integer::operator!=(const int _value) const
 {
   return this->value != _value;
 }
@@ -179,7 +179,7 @@ bool Integer::operator>(const Integer &_integer) const
   return this->value > _integer.getValue();
 }
 
-bool Integer::operator>(int _value) const
+bool Integer::operator>(const int _value) const
 {
   return this->value > _value;
 }
@@ -189,7 +189,7 @@ bool Integer::operator>=(const Integer &_integer) const
   return this->value >= _integer.getValue();
 }
 
-bool Integer::operator>=(int _value) const
+bool Integer::operator>=(const int _value) const
 {
   return this->value >= _value;
 }
@@ -199,7 +199,7 @@ bool Integer::operator<(const Integer &_integer) const
   return this->value < _integer.getValue();
 }
 
-bool Integer::operator<(int _value) const
+bool Integer::operator<(const int _value) const
 {
   return this->value < _value;
 }
@@ -209,7 +209,7 @@ bool Integer::operator<=(const Integer &_integer) const
   return this->value <= _integer.getValue();
 }
 
-bool Integer::operator<=(int _value) const
+bool Integer::operator<=(const int _value) const
 {
   return this->value <= _value;
 }

+ 21 - 21
source/ls-std/boxing/Long.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2023-05-17
+ * Changed:         2024-05-31
  *
  * */
 
@@ -18,15 +18,15 @@ using std::stoll;
 using std::string;
 using std::to_string;
 
-Long::Long(long_type _value) : Class(Long::_fetchClassName()), value(_value)
+Long::Long(const long_type _value) : Class(_fetchClassName()), value(_value)
 {}
 
-Long::Long() : Class(Long::_fetchClassName())
+Long::Long() : Class(_fetchClassName())
 {}
 
 Long::~Long() noexcept = default;
 
-Long &Long::operator=(long_type _value)
+Long &Long::operator=(const long_type _value)
 {
   this->value = _value;
   return *this;
@@ -42,7 +42,7 @@ long_type Long::operator+(const Long &_long) const
   return this->value + _long.getValue();
 }
 
-long_type Long::operator+(long_type _value) const
+long_type Long::operator+(const long_type _value) const
 {
   return this->value + _value;
 }
@@ -52,7 +52,7 @@ long_type Long::operator*(const Long &_long) const
   return this->value * _long.getValue();
 }
 
-long_type Long::operator*(long_type _value) const
+long_type Long::operator*(const long_type _value) const
 {
   return this->value * _value;
 }
@@ -62,14 +62,14 @@ long_type Long::operator-(const Long &_long) const
   return this->value - _long.getValue();
 }
 
-long_type Long::operator-(long_type _value) const
+long_type Long::operator-(const long_type _value) const
 {
   return this->value - _value;
 }
 
 long_type Long::operator/(const Long &_long) const
 {
-  if (_long == (long_type) 0)
+  if (_long == 0)
   {
     throw IllegalArithmeticOperationException{"division by zero is not allowed"};
   }
@@ -77,7 +77,7 @@ long_type Long::operator/(const Long &_long) const
   return this->value / _long.getValue();
 }
 
-long_type Long::operator/(long_type _value) const
+long_type Long::operator/(const long_type _value) const
 {
   if (_value == 0)
   {
@@ -92,7 +92,7 @@ long_type Long::operator%(const Long &_long) const
   return this->value % _long.getValue();
 }
 
-long_type Long::operator%(long_type _value) const
+long_type Long::operator%(const long_type _value) const
 {
   return this->value % _value;
 }
@@ -103,7 +103,7 @@ Long &Long::operator+=(const Long &_long)
   return *this;
 }
 
-Long &Long::operator+=(long_type _value)
+Long &Long::operator+=(const long_type _value)
 {
   this->value += _value;
   return *this;
@@ -115,7 +115,7 @@ Long &Long::operator-=(const Long &_long)
   return *this;
 }
 
-Long &Long::operator-=(long_type _value)
+Long &Long::operator-=(const long_type _value)
 {
   this->value -= _value;
   return *this;
@@ -127,7 +127,7 @@ Long &Long::operator*=(const Long &_long)
   return *this;
 }
 
-Long &Long::operator*=(long_type _value)
+Long &Long::operator*=(const long_type _value)
 {
   this->value *= _value;
   return *this;
@@ -135,7 +135,7 @@ Long &Long::operator*=(long_type _value)
 
 Long &Long::operator/=(const Long &_long)
 {
-  if (_long == (long_type) 0)
+  if (_long == 0)
   {
     throw IllegalArithmeticOperationException{"division by zero is not allowed"};
   }
@@ -144,7 +144,7 @@ Long &Long::operator/=(const Long &_long)
   return *this;
 }
 
-Long &Long::operator/=(long_type _value)
+Long &Long::operator/=(const long_type _value)
 {
   if (_value == 0)
   {
@@ -160,7 +160,7 @@ bool Long::operator==(const Long &_long) const
   return this->value == _long.getValue();
 }
 
-bool Long::operator==(long_type _value) const
+bool Long::operator==(const long_type _value) const
 {
   return this->value == _value;
 }
@@ -170,7 +170,7 @@ bool Long::operator!=(const Long &_long) const
   return this->value != _long.getValue();
 }
 
-bool Long::operator!=(long_type _value) const
+bool Long::operator!=(const long_type _value) const
 {
   return this->value != _value;
 }
@@ -180,7 +180,7 @@ bool Long::operator>(const Long &_long) const
   return this->value > _long.getValue();
 }
 
-bool Long::operator>(long_type _value) const
+bool Long::operator>(const long_type _value) const
 {
   return this->value > _value;
 }
@@ -190,7 +190,7 @@ bool Long::operator>=(const Long &_long) const
   return this->value >= _long.getValue();
 }
 
-bool Long::operator>=(long_type _value) const
+bool Long::operator>=(const long_type _value) const
 {
   return this->value >= _value;
 }
@@ -200,7 +200,7 @@ bool Long::operator<(const Long &_long) const
   return this->value < _long.getValue();
 }
 
-bool Long::operator<(long_type _value) const
+bool Long::operator<(const long_type _value) const
 {
   return this->value < _value;
 }
@@ -210,7 +210,7 @@ bool Long::operator<=(const Long &_long) const
   return this->value <= _long.getValue();
 }
 
-bool Long::operator<=(long_type _value) const
+bool Long::operator<=(const long_type _value) const
 {
   return this->value <= _value;
 }

+ 13 - 13
source/ls-std/boxing/String.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-14
- * Changed:         2023-05-17
+ * Changed:         2024-05-31
  *
  * */
 
@@ -51,9 +51,9 @@ string String::operator+(const char *_string) const
   return this->value + _string;
 }
 
-string String::operator-(int _number) const
+string String::operator-(const int _number) const
 {
-  string copy = this->value;
+  const string copy = this->value;
   return copy.substr(0, copy.size() - _number);
 }
 
@@ -74,7 +74,7 @@ bool String::operator==(String _string) const
   return this->value == _string.toString();
 }
 
-bool String::operator==(string_view _value) const
+bool String::operator==(const string_view _value) const
 {
   return this->value == _value;
 }
@@ -89,7 +89,7 @@ bool String::operator!=(String _string) const
   return this->value != _string.toString();
 }
 
-bool String::operator!=(string_view _value) const
+bool String::operator!=(const string_view _value) const
 {
   return this->value != _value;
 }
@@ -109,12 +109,12 @@ string String::toString()
   return this->value;
 }
 
-bool String::contains(string_view _text) const
+bool String::contains(const string_view _text) const
 {
   return this->value.find(_text) != string::npos;
 }
 
-bool String::endsWith(string_view _text) const
+bool String::endsWith(const string_view _text) const
 {
   return this->value.rfind(_text) == (this->value.size() - _text.size());
 }
@@ -137,12 +137,12 @@ vector<byte_type> String::getByteData()
   return byteData;
 }
 
-string String::padLeft(size_t _width, const char _fillCharacter) const
+string String::padLeft(const size_t _width, const char _fillCharacter) const
 {
   return String::_createFillContent(this->value, _width, _fillCharacter) + this->value;
 }
 
-string String::padRight(size_t _width, const char _fillCharacter) const
+string String::padRight(const size_t _width, const char _fillCharacter) const
 {
   return this->value + String::_createFillContent(this->value, _width, _fillCharacter);
 }
@@ -155,7 +155,7 @@ string String::reverse() const
   return copy;
 }
 
-bool String::startsWith(string_view _text) const
+bool String::startsWith(const string_view _text) const
 {
   return this->value.rfind(_text, 0) == 0;
 }
@@ -176,7 +176,7 @@ string String::toUpperCase() const
   return copy;
 }
 
-string String::_buildCharacterChain(size_t _amount, const char _fillCharacter)
+string String::_buildCharacterChain(const size_t _amount, const char _fillCharacter)
 {
   string fillContent{};
 
@@ -188,9 +188,9 @@ string String::_buildCharacterChain(size_t _amount, const char _fillCharacter)
   return fillContent;
 }
 
-string String::_createFillContent(string_view _text, size_t _width, const char _fillCharacter)
+string String::_createFillContent(const string_view _text, const size_t _width, const char _fillCharacter)
 {
-  size_t fillSize = _text.size() > _width ? 0 : _width - _text.size();
+  const size_t fillSize = _text.size() > _width ? 0 : _width - _text.size();
   string fillContent{};
 
   if (fillSize > 0)

+ 5 - 5
test/cases/boxing/BooleanTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-09
- * Changed:         2023-03-25
+ * Changed:         2024-05-31
  *
  * */
 
@@ -59,13 +59,13 @@ namespace
 
   TEST_F(BooleanTest, operator_negation_negative_value)
   {
-    Boolean expression{};
+    const Boolean expression{};
     ASSERT_TRUE(!expression);
   }
 
   TEST_F(BooleanTest, operator_negation_positive_value)
   {
-    Boolean expression{true};
+    const Boolean expression{true};
     ASSERT_FALSE(!expression);
   }
 
@@ -151,7 +151,7 @@ namespace
             Boolean expression{};
             expression.parse("hello");
           }
-          catch (const IllegalArgumentException &_exception)
+          catch ([[maybe_unused]] const IllegalArgumentException &_exception)
           {
             throw;
           }
@@ -175,7 +175,7 @@ namespace
 
   TEST_F(BooleanTest, getValue)
   {
-    Boolean x{2 < 3};
+    const Boolean x{2 < 3};
     ASSERT_TRUE(x.getValue());
   }
 

+ 45 - 47
test/cases/boxing/DoubleTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-14
- * Changed:         2023-03-25
+ * Changed:         2024-05-31
  *
  * */
 
@@ -40,67 +40,67 @@ namespace
 
   TEST_F(DoubleTest, operator_negative)
   {
-    Double x{3.25};
+    const Double x{3.25};
     ASSERT_DOUBLE_EQ(-3.25, -x);
   }
 
   TEST_F(DoubleTest, operator_addition_with_reference)
   {
-    Double x{3.1415};
-    Double y{2.223};
-    Double z{x + y};
+    const Double x{3.1415};
+    const Double y{2.223};
+    const Double z{x + y};
 
     ASSERT_DOUBLE_EQ(5.3645, z.getValue());
   }
 
   TEST_F(DoubleTest, operator_addition_with_value)
   {
-    Double x{3.1415};
+    const Double x{3.1415};
     ASSERT_DOUBLE_EQ(5.3645, x + 2.223);
   }
 
   TEST_F(DoubleTest, operator_multiplication_with_reference)
   {
-    Double x{3.14};
-    Double y{2.22};
-    Double z{x * y};
+    const Double x{3.14};
+    const Double y{2.22};
+    const Double z{x * y};
 
     ASSERT_DOUBLE_EQ(6.9708, z.getValue());
   }
 
   TEST_F(DoubleTest, operator_multiplication_with_value)
   {
-    Double x{3.14};
+    const Double x{3.14};
     ASSERT_DOUBLE_EQ(6.9708, x * 2.22);
   }
 
   TEST_F(DoubleTest, operator_substraction_with_reference)
   {
-    Double x{3.1415};
-    Double y{2.225};
-    Double z{x - y};
+    const Double x{3.1415};
+    const Double y{2.225};
+    const Double z{x - y};
 
     ASSERT_DOUBLE_EQ(0.9165, z.getValue());
   }
 
   TEST_F(DoubleTest, operator_substraction_with_value)
   {
-    Double x{3.1415};
+    const Double x{3.1415};
     ASSERT_DOUBLE_EQ(0.9165, x - 2.225);
   }
 
   TEST_F(DoubleTest, operator_division_with_reference)
   {
-    Double x{2.25};
-    Double y{0.5};
-    Double z{x / y};
+    const Double x{2.25};
+    const Double y{0.5};
+    const Double z{x / y};
 
     ASSERT_DOUBLE_EQ(4.5, z.getValue());
   }
 
   TEST_F(DoubleTest, operator_division_with_value)
   {
-    Double x{2.25};
+    const Double x{2.25};
     ASSERT_DOUBLE_EQ(4.5, x / 0.5);
   }
 
@@ -109,7 +109,7 @@ namespace
   TEST_F(DoubleTest, operator_add_assign_with_reference)
   {
     Double x{2.25000000};
-    Double y{3.14000000};
+    const Double y{3.14000000};
 
     x += y;
     ASSERT_DOUBLE_EQ(5.39000000, x.getValue());
@@ -126,7 +126,7 @@ namespace
   TEST_F(DoubleTest, operator_sub_assign_with_reference)
   {
     Double x{2.25};
-    Double y{0.04};
+    const Double y{0.04};
 
     x -= y;
     ASSERT_DOUBLE_EQ(2.21, x.getValue());
@@ -143,7 +143,7 @@ namespace
   TEST_F(DoubleTest, operator_mul_assign_with_reference)
   {
     Double x{2.25000000};
-    Double y{0.04000000};
+    const Double y{0.04000000};
 
     x *= y;
     ASSERT_DOUBLE_EQ(0.09000000, x.getValue());
@@ -160,7 +160,7 @@ namespace
   TEST_F(DoubleTest, operator_division_assign_with_reference)
   {
     Double x{2.25};
-    Double y{0.05};
+    const Double y{0.05};
 
     x /= y;
     ASSERT_DOUBLE_EQ(45.0, x.getValue());
@@ -178,8 +178,8 @@ namespace
 
   TEST_F(DoubleTest, operator_equals_with_reference)
   {
-    Double x{3.14159};
-    Double y{3.14159};
+    const Double x{3.14159};
+    const Double y{3.14159};
 
     ASSERT_TRUE(x == y);
     ASSERT_TRUE(y == x);
@@ -187,7 +187,7 @@ namespace
 
   TEST_F(DoubleTest, operator_equals_with_value)
   {
-    Double x{3.14159};
+    const Double x{3.14159};
 
     ASSERT_TRUE(x == 3.14159);
     ASSERT_TRUE(3.14159 == x.getValue());
@@ -195,8 +195,8 @@ namespace
 
   TEST_F(DoubleTest, operator_not_equal_with_reference)
   {
-    Double x{3.1415};
-    Double y{3.1414};
+    const Double x{3.1415};
+    const Double y{3.1414};
 
     ASSERT_TRUE(x != y);
     ASSERT_TRUE(y != x);
@@ -204,7 +204,7 @@ namespace
 
   TEST_F(DoubleTest, operator_not_equal_with_value)
   {
-    Double x{3.1415};
+    const Double x{3.1415};
 
     ASSERT_TRUE(x != 3.1414);
     ASSERT_TRUE(3.1414 != x.getValue());
@@ -212,15 +212,15 @@ namespace
 
   TEST_F(DoubleTest, operator_greater_than_with_reference)
   {
-    Double x{3.1415};
-    Double y{3.1414};
+    const Double x{3.1415};
+    const Double y{3.1414};
 
     ASSERT_TRUE(x > y);
   }
 
   TEST_F(DoubleTest, operator_greater_than_with_value)
   {
-    Double x{3.1415};
+    const Double x{3.1415};
     Double y{3.1414};
 
     ASSERT_TRUE(x > 3.1414);
@@ -228,9 +228,9 @@ namespace
 
   TEST_F(DoubleTest, operator_greater_than_equals_with_reference)
   {
-    Double x{3.1414};
-    Double y{3.1414};
-    Double z{3.1415};
+    const Double x{3.1414};
+    const Double y{3.1414};
+    const Double z{3.1415};
 
     ASSERT_TRUE(x >= y);
     ASSERT_TRUE(z >= y);
@@ -238,31 +238,29 @@ namespace
 
   TEST_F(DoubleTest, operator_greater_than_equals_with_value)
   {
-    Double x{3.1414};
+    const Double x{3.1414};
     ASSERT_TRUE(x >= 3.1414);
   }
 
   TEST_F(DoubleTest, operator_less_than_with_reference)
   {
-    Double x{3.1413};
-    Double y{3.1414};
+    const Double x{3.1413};
+    const Double y{3.1414};
 
     ASSERT_TRUE(x < y);
   }
 
   TEST_F(DoubleTest, operator_less_than_with_value)
   {
-    Double x{3.1413};
-    Double y{3.1414};
-
+    const Double x{3.1413};
     ASSERT_TRUE(x < 3.1414);
   }
 
   TEST_F(DoubleTest, operator_less_than_equals_with_reference)
   {
-    Double x{3.1414};
-    Double y{3.1414};
-    Double z{3.1415};
+    const Double x{3.1414};
+    const Double y{3.1414};
+    const Double z{3.1415};
 
     ASSERT_TRUE(x <= y);
     ASSERT_TRUE(x <= z);
@@ -270,7 +268,7 @@ namespace
 
   TEST_F(DoubleTest, operator_less_than_equals_with_value)
   {
-    Double x{3.1414};
+    const Double x{3.1414};
     ASSERT_TRUE(x <= 3.1414);
   }
 
@@ -320,13 +318,13 @@ namespace
 
   TEST_F(DoubleTest, getEpsilon)
   {
-    Double x{};
+    const Double x{};
     ASSERT_DOUBLE_EQ(0.00000001, x.getEpsilon());
   }
 
   TEST_F(DoubleTest, getValue)
   {
-    Double x{3.1415};
+    const Double x{3.1415};
     ASSERT_DOUBLE_EQ(3.1415, x.getValue());
   }
 
@@ -348,7 +346,7 @@ namespace
           {
             x.setEpsilon(0.0);
           }
-          catch (const IllegalArgumentException &_exception)
+          catch ([[maybe_unused]] const IllegalArgumentException &_exception)
           {
             throw;
           }

+ 46 - 46
test/cases/boxing/FloatTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-14
- * Changed:         2023-03-25
+ * Changed:         2024-05-31
  *
  * */
 
@@ -40,67 +40,67 @@ namespace
 
   TEST_F(FloatTest, operator_negative)
   {
-    Float x{3.25f};
+    const Float x{3.25f};
     ASSERT_FLOAT_EQ(-3.25f, -x);
   }
 
   TEST_F(FloatTest, operator_addition_with_reference)
   {
-    Float x{3.1415f};
-    Float y{2.223f};
-    Float z{x + y};
+    const Float x{3.1415f};
+    const Float y{2.223f};
+    const Float z{x + y};
 
     ASSERT_FLOAT_EQ(5.3645f, z.getValue());
   }
 
   TEST_F(FloatTest, operator_addition_with_value)
   {
-    Float x{3.1415f};
+    const Float x{3.1415f};
     ASSERT_FLOAT_EQ(5.3645f, x + 2.223f);
   }
 
   TEST_F(FloatTest, operator_multiplication_with_reference)
   {
-    Float x{3.14f};
-    Float y{2.22f};
-    Float z{x * y};
+    const Float x{3.14f};
+    const Float y{2.22f};
+    const Float z{x * y};
 
     ASSERT_FLOAT_EQ(6.9708f, z.getValue());
   }
 
   TEST_F(FloatTest, operator_multiplication_with_value)
   {
-    Float x{3.14f};
+    const Float x{3.14f};
     ASSERT_FLOAT_EQ(6.9708f, x * 2.22f);
   }
 
   TEST_F(FloatTest, operator_substraction_with_reference)
   {
-    Float x{3.1415f};
-    Float y{2.225f};
-    Float z{x - y};
+    const Float x{3.1415f};
+    const Float y{2.225f};
+    const Float z{x - y};
 
     ASSERT_FLOAT_EQ(0.9165f, z.getValue());
   }
 
   TEST_F(FloatTest, operator_substraction_with_value)
   {
-    Float x{3.1415f};
+    const Float x{3.1415f};
     ASSERT_FLOAT_EQ(0.9165f, x - 2.225f);
   }
 
   TEST_F(FloatTest, operator_division_with_reference)
   {
-    Float x{2.25f};
-    Float y{0.5f};
-    Float z{x / y};
+    const Float x{2.25f};
+    const Float y{0.5f};
+    const Float z{x / y};
 
     ASSERT_FLOAT_EQ(4.5f, z.getValue());
   }
 
   TEST_F(FloatTest, operator_division_with_value)
   {
-    Float x{2.25f};
+    const Float x{2.25f};
     ASSERT_FLOAT_EQ(4.5f, x / 0.5f);
   }
 
@@ -109,7 +109,7 @@ namespace
   TEST_F(FloatTest, operator_add_assign_with_reference)
   {
     Float x{2.25f};
-    Float y{3.14f};
+    const Float y{3.14f};
     x += y;
 
     ASSERT_FLOAT_EQ(5.39f, x.getValue());
@@ -126,7 +126,7 @@ namespace
   TEST_F(FloatTest, operator_sub_assign_with_reference)
   {
     Float x{2.25f};
-    Float y{1.14f};
+    const Float y{1.14f};
     x -= y;
 
     ASSERT_FLOAT_EQ(1.11f, x.getValue());
@@ -143,7 +143,7 @@ namespace
   TEST_F(FloatTest, operator_mul_assign_with_reference)
   {
     Float x{2.25f};
-    Float y{0.04f};
+    const Float y{0.04f};
     x *= y;
 
     ASSERT_FLOAT_EQ(0.09f, x.getValue());
@@ -160,7 +160,7 @@ namespace
   TEST_F(FloatTest, operator_division_assign_with_reference)
   {
     Float x{2.25f};
-    Float y{1.5f};
+    const Float y{1.5f};
     x /= y;
 
     ASSERT_FLOAT_EQ(1.5f, x.getValue());
@@ -178,8 +178,8 @@ namespace
 
   TEST_F(FloatTest, operator_equals_with_reference)
   {
-    Float x{3.14159f};
-    Float y{3.14159f};
+    const Float x{3.14159f};
+    const Float y{3.14159f};
 
     ASSERT_TRUE(x == y);
     ASSERT_TRUE(y == x);
@@ -187,14 +187,14 @@ namespace
 
   TEST_F(FloatTest, operator_equals_with_value)
   {
-    Float x{3.14159f};
+    const Float x{3.14159f};
     ASSERT_TRUE(x == 3.14159f);
   }
 
   TEST_F(FloatTest, operator_not_equals_with_reference)
   {
-    Float x{3.1415f};
-    Float y{3.1414f};
+    const Float x{3.1415f};
+    const Float y{3.1414f};
 
     ASSERT_TRUE(x != y);
     ASSERT_TRUE(y != x);
@@ -202,14 +202,14 @@ namespace
 
   TEST_F(FloatTest, operator_not_equals_with_value)
   {
-    Float x{3.1415f};
+    const Float x{3.1415f};
     ASSERT_TRUE(x != 3.1414f);
   }
 
   TEST_F(FloatTest, operator_greater_than_with_reference)
   {
-    Float x{3.1415f};
-    Float y{3.1414f};
+    const Float x{3.1415f};
+    const Float y{3.1414f};
 
     ASSERT_TRUE(x > y);
     ASSERT_TRUE(x > 3.1414f);
@@ -217,15 +217,15 @@ namespace
 
   TEST_F(FloatTest, operator_greater_than_with_value)
   {
-    Float x{3.1415f};
+    const Float x{3.1415f};
     ASSERT_TRUE(x > 3.1414f);
   }
 
   TEST_F(FloatTest, operator_greater_than_equals_with_reference)
   {
-    Float x{3.1414f};
-    Float y{3.1414f};
-    Float z{3.1415f};
+    const Float x{3.1414f};
+    const Float y{3.1414f};
+    const Float z{3.1415f};
 
     ASSERT_TRUE(x >= y);
     ASSERT_TRUE(z >= y);
@@ -233,8 +233,8 @@ namespace
 
   TEST_F(FloatTest, operator_greater_than_equals_with_value)
   {
-    Float x{3.1414f};
-    Float z{3.1415f};
+    const Float x{3.1414f};
+    const Float z{3.1415f};
 
     ASSERT_TRUE(x >= 3.1414f);
     ASSERT_TRUE(z >= 3.1414f);
@@ -242,23 +242,23 @@ namespace
 
   TEST_F(FloatTest, operator_less_than_with_reference)
   {
-    Float x{3.1413f};
-    Float y{3.1414f};
+    const Float x{3.1413f};
+    const Float y{3.1414f};
 
     ASSERT_TRUE(x < y);
   }
 
   TEST_F(FloatTest, operator_less_than_with_value)
   {
-    Float x{3.1413f};
+    const Float x{3.1413f};
     ASSERT_TRUE(x < 3.1414f);
   }
 
   TEST_F(FloatTest, operator_less_than_equals_with_reference)
   {
-    Float x{3.1414f};
-    Float y{3.1414f};
-    Float z{3.1415f};
+    const Float x{3.1414f};
+    const Float y{3.1414f};
+    const Float z{3.1415f};
 
     ASSERT_TRUE(x <= y);
     ASSERT_TRUE(x <= z);
@@ -266,7 +266,7 @@ namespace
 
   TEST_F(FloatTest, operator_less_than_equals_with_value)
   {
-    Float x{3.1414f};
+    const Float x{3.1414f};
 
     ASSERT_TRUE(x <= 3.1414f);
     ASSERT_TRUE(x <= 3.1415f);
@@ -310,13 +310,13 @@ namespace
 
   TEST_F(FloatTest, getEpsilon)
   {
-    Float x{};
+    const Float x{};
     ASSERT_FLOAT_EQ(0.00001f, x.getEpsilon());
   }
 
   TEST_F(FloatTest, getValue)
   {
-    Float x{3.1415f};
+    const Float x{3.1415f};
     ASSERT_FLOAT_EQ(3.1415f, x.getValue());
   }
 
@@ -338,7 +338,7 @@ namespace
           {
             x.setEpsilon(0.0f);
           }
-          catch (const IllegalArgumentException &_exception)
+          catch ([[maybe_unused]] const IllegalArgumentException &_exception)
           {
             throw;
           }

+ 47 - 47
test/cases/boxing/IntegerTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-09
- * Changed:         2023-05-17
+ * Changed:         2024-05-31
  *
  * */
 
@@ -30,7 +30,7 @@ namespace
   TEST_F(IntegerTest, operator_assignment_with_reference)
   {
     Integer x{};
-    Integer y{3};
+    const Integer y{3};
     x = y;
 
     ASSERT_EQ(3, x.getValue());
@@ -48,8 +48,8 @@ namespace
 
   TEST_F(IntegerTest, operator_negative)
   {
-    Integer x{13};
-    Integer y{-13};
+    const Integer x{13};
+    const Integer y{-13};
 
     ASSERT_EQ(-13, -x);
     ASSERT_EQ(13, -y);
@@ -57,57 +57,57 @@ namespace
 
   TEST_F(IntegerTest, operator_add_with_reference)
   {
-    Integer x{13};
-    Integer y{7};
+    const Integer x{13};
+    const Integer y{7};
 
     ASSERT_EQ(20, x + y);
   }
 
   TEST_F(IntegerTest, operator_add_with_value)
   {
-    Integer x{13};
+    const Integer x{13};
     ASSERT_EQ(20, x + 7);
   }
 
   TEST_F(IntegerTest, operator_mul_with_reference)
   {
-    Integer x{3};
-    Integer y{7};
+    const Integer x{3};
+    const Integer y{7};
 
     ASSERT_EQ(21, x * y);
   }
 
   TEST_F(IntegerTest, operator_mul_with_value)
   {
-    Integer x{3};
+    const Integer x{3};
     ASSERT_EQ(21, x * 7);
   }
 
   TEST_F(IntegerTest, operator_sub_with_reference)
   {
-    Integer x{51};
-    Integer y{17};
+    const Integer x{51};
+    const Integer y{17};
 
     ASSERT_EQ(34, x - y);
   }
 
   TEST_F(IntegerTest, operator_sub_with_value)
   {
-    Integer x{51};
+    const Integer x{51};
     ASSERT_EQ(34, x - 17);
   }
 
   TEST_F(IntegerTest, operator_div_with_reference)
   {
-    Integer x{81};
-    Integer y{9};
+    const Integer x{81};
+    const Integer y{9};
 
     ASSERT_EQ(9, x / y);
   }
 
   TEST_F(IntegerTest, operator_div_with_value)
   {
-    Integer x{81};
+    const Integer x{81};
     ASSERT_EQ(9, x / 9);
   }
 
@@ -122,7 +122,7 @@ namespace
 
             x = x / y;
           }
-          catch (const IllegalArithmeticOperationException &_exception)
+          catch ([[maybe_unused]] const IllegalArithmeticOperationException &_exception)
           {
             throw;
           }
@@ -139,7 +139,7 @@ namespace
             Integer x{9};
             x = x / 0;
           }
-          catch (const IllegalArithmeticOperationException &_exception)
+          catch ([[maybe_unused]] const IllegalArithmeticOperationException &_exception)
           {
             throw;
           }
@@ -149,15 +149,15 @@ namespace
 
   TEST_F(IntegerTest, operator_mod_with_reference)
   {
-    Integer x{85};
-    Integer y{9};
+    const Integer x{85};
+    const Integer y{9};
 
     ASSERT_EQ(4, x % y);
   }
 
   TEST_F(IntegerTest, operator_mod_with_value)
   {
-    Integer x{85};
+    const Integer x{85};
     ASSERT_EQ(4, x % 9);
   }
 
@@ -166,7 +166,7 @@ namespace
   TEST_F(IntegerTest, operator_add_assign_with_reference)
   {
     Integer x{4};
-    Integer y{2};
+    const Integer y{2};
     x += y;
 
     ASSERT_EQ(6, x.getValue());
@@ -183,7 +183,7 @@ namespace
   TEST_F(IntegerTest, operator_sub_assign_with_reference)
   {
     Integer x{14};
-    Integer y{2};
+    const Integer y{2};
     x -= y;
 
     ASSERT_EQ(12, x.getValue());
@@ -200,7 +200,7 @@ namespace
   TEST_F(IntegerTest, operator_mul_assign_with_reference)
   {
     Integer x{6};
-    Integer y{3};
+    const Integer y{3};
     x *= y;
 
     ASSERT_EQ(18, x.getValue());
@@ -217,7 +217,7 @@ namespace
   TEST_F(IntegerTest, operator_div_assign_with_reference)
   {
     Integer x{12};
-    Integer y{3};
+    const Integer y{3};
     x /= y;
 
     ASSERT_EQ(4, x.getValue());
@@ -242,7 +242,7 @@ namespace
 
             x = x /= y;
           }
-          catch (const IllegalArithmeticOperationException &_exception)
+          catch ([[maybe_unused]] const IllegalArithmeticOperationException &_exception)
           {
             throw;
           }
@@ -259,7 +259,7 @@ namespace
             Integer x{9};
             x = x /= 0;
           }
-          catch (const IllegalArithmeticOperationException &_exception)
+          catch ([[maybe_unused]] const IllegalArithmeticOperationException &_exception)
           {
             throw;
           }
@@ -271,86 +271,86 @@ namespace
 
   TEST_F(IntegerTest, operator_equals_with_reference)
   {
-    Integer x{12};
-    Integer y{12};
+    const Integer x{12};
+    const Integer y{12};
 
     ASSERT_TRUE(x == y);
   }
 
   TEST_F(IntegerTest, operator_equals_with_value)
   {
-    Integer x{12};
+    const Integer x{12};
 
     ASSERT_TRUE(x == 12);
   }
 
   TEST_F(IntegerTest, operator_not_equals_with_reference)
   {
-    Integer x{12};
-    Integer y{3};
+    const Integer x{12};
+    const Integer y{3};
 
     ASSERT_TRUE(x != y);
   }
 
   TEST_F(IntegerTest, operator_not_equals_with_value)
   {
-    Integer x{12};
+    const Integer x{12};
     ASSERT_TRUE(x != 3);
   }
 
   TEST_F(IntegerTest, operator_greater_than_with_reference)
   {
-    Integer x{12};
-    Integer y{3};
+    const Integer x{12};
+    const Integer y{3};
 
     ASSERT_TRUE(x > y);
   }
 
   TEST_F(IntegerTest, operator_greater_than_with_value)
   {
-    Integer x{12};
+    const Integer x{12};
     ASSERT_TRUE(x > 3);
   }
 
   TEST_F(IntegerTest, operator_greater_than_equals_with_reference)
   {
-    Integer x{12};
-    Integer y{12};
+    const Integer x{12};
+    const Integer y{12};
 
     ASSERT_TRUE(x >= y);
   }
 
   TEST_F(IntegerTest, operator_greater_than_equals_with_value)
   {
-    Integer x{12};
+    const Integer x{12};
     ASSERT_TRUE(x >= 12);
   }
 
   TEST_F(IntegerTest, operator_less_than_with_reference)
   {
-    Integer x{10};
-    Integer y{12};
+    const Integer x{10};
+    const Integer y{12};
 
     ASSERT_TRUE(x < y);
   }
 
   TEST_F(IntegerTest, operator_less_than_with_value)
   {
-    Integer x{10};
+    const Integer x{10};
     ASSERT_TRUE(x < 12);
   }
 
   TEST_F(IntegerTest, operator_less_than_equals_with_reference)
   {
-    Integer x{10};
-    Integer y{10};
+    const Integer x{10};
+    const Integer y{10};
 
     ASSERT_TRUE(x <= y);
   }
 
   TEST_F(IntegerTest, operator_less_than_equals_with_value)
   {
-    Integer x{10};
+    const Integer x{10};
     ASSERT_TRUE(x <= 10);
   }
 
@@ -358,7 +358,7 @@ namespace
 
   TEST_F(IntegerTest, operator_negation)
   {
-    Integer x{};
+    const Integer x{};
     ASSERT_TRUE(!x);
   }
 
@@ -408,7 +408,7 @@ namespace
 
   TEST_F(IntegerTest, getValue)
   {
-    Integer x{3};
+    const Integer x{3};
     ASSERT_EQ(3, x.getValue());
   }
 

+ 63 - 63
test/cases/boxing/LongTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2023-05-17
+ * Changed:         2024-05-31
  *
  * */
 
@@ -31,7 +31,7 @@ namespace
   TEST_F(LongTest, operator_assignment_with_reference)
   {
     Long x{13};
-    Long y{3};
+    const Long y{3};
     x = y;
 
     ASSERT_EQ(3, x.getValue());
@@ -40,7 +40,7 @@ namespace
   TEST_F(LongTest, operator_assignment_with_value)
   {
     Long x{13};
-    x = (long_type) 3;
+    x = 3;
 
     ASSERT_EQ(3, x.getValue());
   }
@@ -49,8 +49,8 @@ namespace
 
   TEST_F(LongTest, operator_negative)
   {
-    Long x{13};
-    Long y{-13};
+    const Long x{13};
+    const Long y{-13};
 
     ASSERT_EQ(-13, -x);
     ASSERT_EQ(13, -y);
@@ -58,57 +58,57 @@ namespace
 
   TEST_F(LongTest, operator_add_with_reference)
   {
-    Long x{13};
-    Long y{7};
+    const Long x{13};
+    const Long y{7};
 
     ASSERT_EQ(20, x + y);
   }
 
   TEST_F(LongTest, operator_add_with_value)
   {
-    Long x{13};
-    ASSERT_EQ(20, x + (long_type) 7);
+    const Long x{13};
+    ASSERT_EQ(20, x + 7);
   }
 
   TEST_F(LongTest, operator_mul_with_reference)
   {
-    Long x{3};
-    Long y{7};
+    const Long x{3};
+    const Long y{7};
 
     ASSERT_EQ(21, x * y);
   }
 
   TEST_F(LongTest, operator_mul_with_value)
   {
-    Long x{3};
+    const Long x{3};
     ASSERT_EQ(21, x * (long_type) 7);
   }
 
   TEST_F(LongTest, operator_sub_with_reference)
   {
-    Long x{51};
-    Long y{17};
+    const Long x{51};
+    const Long y{17};
 
     ASSERT_EQ(34, x - y);
   }
 
   TEST_F(LongTest, operator_sub_with_value)
   {
-    Long x{51};
-    ASSERT_EQ(34, x - (long_type) 17);
+    const Long x{51};
+    ASSERT_EQ(34, x - 17);
   }
 
   TEST_F(LongTest, operator_div_with_reference)
   {
-    Long x{81};
-    Long y{9};
+    const Long x{81};
+    const Long y{9};
 
     ASSERT_EQ(9, x / y);
   }
 
   TEST_F(LongTest, operator_div_with_value)
   {
-    Long x{81};
+    const Long x{81};
     ASSERT_EQ(9, x / (long_type) 9);
   }
 
@@ -123,7 +123,7 @@ namespace
 
             x = x / y;
           }
-          catch (const IllegalArithmeticOperationException &_exception)
+          catch ([[maybe_unused]] const IllegalArithmeticOperationException &_exception)
           {
             throw;
           }
@@ -138,9 +138,9 @@ namespace
           try
           {
             Long x{9};
-            x = x / (long_type) 0;
+            x = x / 0;
           }
-          catch (const IllegalArithmeticOperationException &_exception)
+          catch ([[maybe_unused]] const IllegalArithmeticOperationException &_exception)
           {
             throw;
           }
@@ -150,16 +150,16 @@ namespace
 
   TEST_F(LongTest, operator_mod_with_reference)
   {
-    Long x{85};
-    Long y{9};
+    const Long x{85};
+    const Long y{9};
 
     ASSERT_EQ(4, x % y);
   }
 
   TEST_F(LongTest, operator_mod_with_value)
   {
-    Long x{85};
-    ASSERT_EQ(4, x % (long_type) 9);
+    const Long x{85};
+    ASSERT_EQ(4, x % 9);
   }
 
   // compound operators
@@ -167,7 +167,7 @@ namespace
   TEST_F(LongTest, operator_add_equals_with_reference)
   {
     Long x{4};
-    Long y{2};
+    const Long y{2};
     x += y;
 
     ASSERT_EQ(6, x.getValue());
@@ -176,7 +176,7 @@ namespace
   TEST_F(LongTest, operator_add_equals_with_value)
   {
     Long x{4};
-    x += (long_type) 2;
+    x += 2;
 
     ASSERT_EQ(6, x.getValue());
   }
@@ -184,7 +184,7 @@ namespace
   TEST_F(LongTest, operator_sub_equals_with_reference)
   {
     Long x{14};
-    Long y{2};
+    const Long y{2};
     x -= y;
 
     ASSERT_EQ(12, x.getValue());
@@ -193,7 +193,7 @@ namespace
   TEST_F(LongTest, operator_sub_equals_with_value)
   {
     Long x{14};
-    x -= (long_type) 2;
+    x -= 2;
 
     ASSERT_EQ(12, x.getValue());
   }
@@ -201,7 +201,7 @@ namespace
   TEST_F(LongTest, operator_mul_equals_with_reference)
   {
     Long x{6};
-    Long y{3};
+    const Long y{3};
     x *= y;
 
     ASSERT_EQ(18, x.getValue());
@@ -210,7 +210,7 @@ namespace
   TEST_F(LongTest, operator_mul_equals_with_value)
   {
     Long x{6};
-    x *= (long_type) 3;
+    x *= 3;
 
     ASSERT_EQ(18, x.getValue());
   }
@@ -218,7 +218,7 @@ namespace
   TEST_F(LongTest, operator_div_equals_with_reference)
   {
     Long x{12};
-    Long y{3};
+    const Long y{3};
     x /= y;
 
     ASSERT_EQ(4, x.getValue());
@@ -227,7 +227,7 @@ namespace
   TEST_F(LongTest, operator_div_equals_with_value)
   {
     Long x{12};
-    x /= (long_type) 3;
+    x /= 3;
 
     ASSERT_EQ(4, x.getValue());
   }
@@ -243,7 +243,7 @@ namespace
 
             x = x /= y;
           }
-          catch (const IllegalArithmeticOperationException &_exception)
+          catch ([[maybe_unused]] const IllegalArithmeticOperationException &_exception)
           {
             throw;
           }
@@ -258,9 +258,9 @@ namespace
           try
           {
             Long x{9};
-            x = x /= (long_type) 0;
+            x = x /= 0;
           }
-          catch (const IllegalArithmeticOperationException &_exception)
+          catch ([[maybe_unused]] const IllegalArithmeticOperationException &_exception)
           {
             throw;
           }
@@ -272,95 +272,95 @@ namespace
 
   TEST_F(LongTest, operator_equals_with_reference)
   {
-    Long x{12};
-    Long y{12};
+    const Long x{12};
+    const Long y{12};
 
     ASSERT_TRUE(x == y);
   }
 
   TEST_F(LongTest, operator_equals_with_value)
   {
-    Long x{12};
-    ASSERT_TRUE(x == (long_type) 12);
+    const Long x{12};
+    ASSERT_TRUE(x == 12);
   }
 
   TEST_F(LongTest, operator_not_equals_with_reference)
   {
-    Long x{12};
-    Long y{3};
+    const Long x{12};
+    const Long y{3};
 
     ASSERT_TRUE(x != y);
   }
 
   TEST_F(LongTest, operator_not_equals_with_value)
   {
-    Long x{12};
-    ASSERT_TRUE(x != (long_type) 3);
+    const Long x{12};
+    ASSERT_TRUE(x != 3);
   }
 
   TEST_F(LongTest, operator_greater_than_with_reference)
   {
-    Long x{12};
-    Long y{3};
+    const Long x{12};
+    const Long y{3};
 
     ASSERT_TRUE(x > y);
   }
 
   TEST_F(LongTest, operator_greater_than_with_value)
   {
-    Long x{12};
-    ASSERT_TRUE(x > (long_type) 3);
+    const Long x{12};
+    ASSERT_TRUE(x > 3);
   }
 
   TEST_F(LongTest, operator_greater_than_equals_with_reference)
   {
-    Long x{12};
-    Long y{12};
+    const Long x{12};
+    const Long y{12};
 
     ASSERT_TRUE(x >= y);
   }
 
   TEST_F(LongTest, operator_greater_than_equals_with_value)
   {
-    Long x{12};
-    ASSERT_TRUE(x >= (long_type) 12);
+    const Long x{12};
+    ASSERT_TRUE(x >= 12);
   }
 
   TEST_F(LongTest, operator_less_than_with_reference)
   {
-    Long x{10};
-    Long y{12};
+    const Long x{10};
+    const Long y{12};
 
     ASSERT_TRUE(x < y);
   }
 
   TEST_F(LongTest, operator_less_than_with_value)
   {
-    Long x{10};
+    const Long x{10};
     Long y{12};
 
-    ASSERT_TRUE(x < (long_type) 12);
+    ASSERT_TRUE(x < 12);
   }
 
   TEST_F(LongTest, operator_less_than_equals_with_reference)
   {
-    Long x{10};
-    Long y{10};
+    const Long x{10};
+    const Long y{10};
 
     ASSERT_TRUE(x <= y);
   }
 
   TEST_F(LongTest, operator_less_than_equals_with_value)
   {
-    Long x{10};
-    ASSERT_TRUE(x <= (long_type) 10);
+    const Long x{10};
+    ASSERT_TRUE(x <= 10);
   }
 
   // logical operators
 
   TEST_F(LongTest, operator_negation)
   {
-    Long x{};
+    const Long x{};
     ASSERT_TRUE(!x);
   }
 
@@ -410,7 +410,7 @@ namespace
 
   TEST_F(LongTest, getValue)
   {
-    Long x{3};
+    const Long x{3};
     ASSERT_EQ(3, x.getValue());
   }
 

+ 11 - 11
test/cases/boxing/StringTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-14
- * Changed:         2023-03-25
+ * Changed:         2024-05-31
  *
  * */
 
@@ -39,7 +39,7 @@ namespace
   TEST_F(StringTest, operator_add)
   {
     String greetings{"Hello! "};
-    String question{"How are you? "};
+    const String question{"How are you? "};
     const string &answer = "I'm good by the way!";
 
     greetings = greetings + question + answer;
@@ -60,7 +60,7 @@ namespace
   TEST_F(StringTest, operator_add_assign_with_reference)
   {
     String text{};
-    String hello{"Hi!"};
+    const String hello{"Hi!"};
 
     text += hello;
     ASSERT_STREQ("Hi!", text.toString().c_str());
@@ -78,8 +78,8 @@ namespace
 
   TEST_F(StringTest, operator_equals_with_reference)
   {
-    String text{"Hi!"};
-    String hello{"Hi!"};
+    const String text{"Hi!"};
+    const String hello{"Hi!"};
 
     ASSERT_TRUE(text == hello);
     ASSERT_TRUE(hello == text);
@@ -87,21 +87,21 @@ namespace
 
   TEST_F(StringTest, operator_equals_with_value)
   {
-    String hello{"Hi!"};
+    const String hello{"Hi!"};
     ASSERT_TRUE(hello == "Hi!");
   }
 
   TEST_F(StringTest, operator_not_equals_with_reference)
   {
-    String text{"Hi!"};
-    String hello{"Hello!"};
+    const String text{"Hi!"};
+    const String hello{"Hello!"};
 
     ASSERT_TRUE(text != hello);
   }
 
   TEST_F(StringTest, operator_not_equals_with_value)
   {
-    String text{"Hi!"};
+    const String text{"Hi!"};
     ASSERT_TRUE(text != "Hello!");
   }
 
@@ -157,8 +157,8 @@ namespace
 
   TEST_F(StringTest, equalsIgnoreCase)
   {
-    String text{"Hello!"};
-    String hello{"HeLLo!"};
+    const String text{"Hello!"};
+    const String hello{"HeLLo!"};
 
     ASSERT_TRUE(text.equalsIgnoreCase(hello));
     ASSERT_TRUE(text.equalsIgnoreCase("HeLLO!"));