[Uml-devel] KDE/kdesdk/umbrello/umbrello/codeimport/kdevcppparser

Thiago Macieira thiago at kde.org
Mon Mar 24 10:33:22 UTC 2008


SVN commit 789450 by thiago:

Don't return references to temporaries


 M  +2 -2      lexer.h  


--- trunk/KDE/kdesdk/umbrello/umbrello/codeimport/kdevcppparser/lexer.h #789449:789450
@@ -189,7 +189,7 @@
   void setSource( const QString& source );
 
   void setRecordComments( bool record );
-  Position const& currentPosition() const
+  Position currentPosition() const
   {return m_source.get_currentPosition();}
   Token const& lookAhead( TokenIterator p_it, int n ) const {
     std::advance( p_it, n);
@@ -381,7 +381,7 @@
       return (QString( &*l_it, l_len).toLower() == p_pattern);
     }
     /* getters */
-    Position const& get_currentPosition() const {return m_ptr.get_position();}
+    Position get_currentPosition() const {return m_ptr.get_position();}
     CharIterator get_ptr() const {return m_ptr;}
     QString const& get_source() const {return m_source;}
     bool get_startLine() const {return m_startLine;}




More information about the umbrello-devel mailing list