]> Git trees. - libqmvoc.git/commitdiff
Remove Color::operator=
authorBenoît Jacob <jacob.benoit.1@gmail.com>
Wed, 18 Oct 2006 06:33:35 +0000 (06:33 +0000)
committerBenoît Jacob <jacob.benoit.1@gmail.com>
Wed, 18 Oct 2006 06:33:35 +0000 (06:33 +0000)
Spare a reinterpret_cast in Color::apply()

svn path=/trunk/KDE/kdeedu/kalzium/src/kalziumglhelperclasses.cpp; revision=596670

kalzium/kalziumglhelperclasses.cpp
kalzium/kalziumglhelperclasses.h

index 94b86f7e72faa1a063184168f965c21695b0c701..a1e54018caf3742f827c89f6bfc20fbe59eb2282 100644 (file)
@@ -63,16 +63,6 @@ Color::Color( const OBAtom* atom )
        m_alpha = 1.0;
 }
 
-Color& Color::operator=( const Color& other )
-{
-       m_red = other.m_red;
-       m_green = other.m_green;
-       m_blue = other.m_blue;
-       m_alpha = other.m_alpha;
-
-       return *this;
-}
-
 void Color::applyAsMaterials()
 {
        GLfloat ambientColor [] = { m_red / 2, m_green / 2, m_blue / 2,
index 7b10125d9bb0834d39bbe1aa495ae078a05742aa..61b7fee66526e642e3f3596f68dc19421670ef69 100644 (file)
@@ -135,14 +135,12 @@ struct Color
         * the atom should be rendered. */
        Color( const OpenBabel::OBAtom *atom );
 
-       Color& operator=( const Color& other );
-
        /**
         * Sets this color to be the one used by OpenGL for rendering
         * when lighting is disabled. */
        inline void apply()
        {
-               glColor4fv( reinterpret_cast<GLfloat *>( this ) );
+               glColor4fv( &m_red );
        }
 
        /**