diff --git a/common/utf8.cpp b/common/utf8.cpp index c9a2e60d1b..f449d10885 100644 --- a/common/utf8.cpp +++ b/common/utf8.cpp @@ -232,5 +232,5 @@ UTF8& UTF8::operator+=( unsigned w_ch ) m_s += substr.m_s; } - return (UTF8&) *this; + return *this; } diff --git a/include/tool/tool_event.h b/include/tool/tool_event.h index c1fcbac5b3..4577a8ef76 100644 --- a/include/tool/tool_event.h +++ b/include/tool/tool_event.h @@ -578,6 +578,9 @@ public: m_events.push_back( aSingleEvent ); } + ///> Copy an existing TOOL_EVENT_LIST + TOOL_EVENT_LIST( const TOOL_EVENT_LIST& aEventList ) = default; + /** * Function Format() * Returns information about event in form of a human-readable string. diff --git a/include/utf8.h b/include/utf8.h index 3591f1aff3..3360bc85ea 100644 --- a/include/utf8.h +++ b/include/utf8.h @@ -128,21 +128,21 @@ public: { m_s += str.m_s; MAYBE_VERIFY_UTF8( c_str() ); - return (UTF8&) *this; + return *this; } UTF8& operator+=( char ch ) { m_s.operator+=( ch ); MAYBE_VERIFY_UTF8( c_str() ); - return (UTF8&) *this; + return *this; } UTF8& operator+=( const char* s ) { m_s.operator+=( s ); MAYBE_VERIFY_UTF8( c_str() ); - return (UTF8&) *this; + return *this; } /// Append a wide (unicode) char to the UTF8 string. diff --git a/libs/kimath/include/geometry/shape_line_chain.h b/libs/kimath/include/geometry/shape_line_chain.h index 0c6e7a8019..4948a34915 100644 --- a/libs/kimath/include/geometry/shape_line_chain.h +++ b/libs/kimath/include/geometry/shape_line_chain.h @@ -118,6 +118,8 @@ public: virtual ~SHAPE_LINE_CHAIN() {} + SHAPE_LINE_CHAIN& operator=(const SHAPE_LINE_CHAIN&) = default; + SHAPE* Clone() const override; /** diff --git a/libs/kimath/include/math/vector2d.h b/libs/kimath/include/math/vector2d.h index 03254919f0..28b3acf264 100644 --- a/libs/kimath/include/math/vector2d.h +++ b/libs/kimath/include/math/vector2d.h @@ -107,6 +107,13 @@ public: y = (T) aVec.y; } + /// Copy a vector + VECTOR2( const VECTOR2& aVec ) + { + x = aVec.x; + y = aVec.y; + } + /// Casts a vector to another specialized subclass. Beware of rouding /// issues. template