From: <bl...@us...> - 2003-04-22 19:17:06
|
Update of /cvsroot/cpptool/rfta/src/rfta In directory sc8-pr-cvs1:/tmp/cvs-serv23816/src/rfta Modified Files: CodeModelExpressions.cpp CodeRewriter.cpp CodeRewriter.h Log Message: * changed tabs to spaces * made DeclaratorExpression visitor used a shared_ptr * removed extraneous string includes Index: CodeModelExpressions.cpp =================================================================== RCS file: /cvsroot/cpptool/rfta/src/rfta/CodeModelExpressions.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** CodeModelExpressions.cpp 21 Apr 2003 03:08:54 -0000 1.15 --- CodeModelExpressions.cpp 22 Apr 2003 19:17:00 -0000 1.16 *************** *** 168,172 **** DeclaratorExpression::accept( ExpressionVisitor &visitor ) { ! visitor.visit( *this ); } --- 168,172 ---- DeclaratorExpression::accept( ExpressionVisitor &visitor ) { ! visitor.visit( makeSharedFromThis(this) ); } Index: CodeRewriter.cpp =================================================================== RCS file: /cvsroot/cpptool/rfta/src/rfta/CodeRewriter.cpp,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** CodeRewriter.cpp 21 Apr 2003 16:06:50 -0000 1.41 --- CodeRewriter.cpp 22 Apr 2003 19:17:01 -0000 1.42 *************** *** 632,655 **** void ! CodeRewriter::visit( const DeclaratorExpression &expression ) { if ( isInserting() ) beginInsertNewStatement(); ! ! handleMandatoryChange( expression.getPrimaryTypeChange(), ! *expression.getPrimaryType() ); bool firstWasAdded = false; ! for ( int index = 0; index < expression.getChangeCount(); ++ index ) { ! Change change = expression.getChangeAt( index ); deleteTextIfNecessary( change ); if (change.wasRemoved()) ! continue; if ( index == 0 ) ! firstWasAdded = change.wasAdded(); if ( needsToInsertComma( change, index, firstWasAdded ) ) ! insertText( ", " ); ! DeclaratorPtr declarator = expression.getChangeDeclaratorAt( index ); ModeModifier mode( mode_, change.isUnmodified() ? updating : inserting ); --- 632,655 ---- void ! CodeRewriter::visit( const DeclaratorExpressionPtr &expression ) { if ( isInserting() ) beginInsertNewStatement(); ! ! handleMandatoryChange( expression->getPrimaryTypeChange(), ! *expression->getPrimaryType() ); bool firstWasAdded = false; ! for ( int index = 0; index < expression->getChangeCount(); ++ index ) { ! Change change = expression->getChangeAt( index ); deleteTextIfNecessary( change ); if (change.wasRemoved()) ! continue; if ( index == 0 ) ! firstWasAdded = change.wasAdded(); if ( needsToInsertComma( change, index, firstWasAdded ) ) ! insertText( ", " ); ! DeclaratorPtr declarator = expression->getChangeDeclaratorAt( index ); ModeModifier mode( mode_, change.isUnmodified() ? updating : inserting ); Index: CodeRewriter.h =================================================================== RCS file: /cvsroot/cpptool/rfta/src/rfta/CodeRewriter.h,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** CodeRewriter.h 21 Apr 2003 03:08:54 -0000 1.18 --- CodeRewriter.h 22 Apr 2003 19:17:02 -0000 1.19 *************** *** 6,20 **** #define RFTA_CODEREWRITER_H #include "TransformList.h" #include <rfta/parser/SourceRange.h> #include <rfta/refactoring/CodeModelVisitor.h> #include <string> - #include "IndentLevelManager.h" - #ifndef _MSC_VER - # include <string> - #endif - namespace Refactoring { --- 6,16 ---- #define RFTA_CODEREWRITER_H + #include "IndentLevelManager.h" #include "TransformList.h" #include <rfta/parser/SourceRange.h> #include <rfta/refactoring/CodeModelVisitor.h> #include <string> namespace Refactoring { *************** *** 59,63 **** void visit( const AssignInitializerExpressionPtr &expression ); void visit( const ConstructorInitializerExpressionPtr &expression ); ! void visit( const DeclaratorExpression &expression ); void visit( const DefaultConditionExpressionPtr &expression ); void visit( const ExpressionPtr &expression ); --- 55,59 ---- void visit( const AssignInitializerExpressionPtr &expression ); void visit( const ConstructorInitializerExpressionPtr &expression ); ! void visit( const DeclaratorExpressionPtr &expression ); void visit( const DefaultConditionExpressionPtr &expression ); void visit( const ExpressionPtr &expression ); |