diff options
Diffstat (limited to 'kate/cppsymbolviewer/cpp_parser.cpp')
-rw-r--r-- | kate/cppsymbolviewer/cpp_parser.cpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/kate/cppsymbolviewer/cpp_parser.cpp b/kate/cppsymbolviewer/cpp_parser.cpp index b666983..9aceda2 100644 --- a/kate/cppsymbolviewer/cpp_parser.cpp +++ b/kate/cppsymbolviewer/cpp_parser.cpp @@ -23,9 +23,9 @@ void KatePluginSymbolViewerView::parseCppSymbols(void) TQString cl; // Current Line TQString stripped; uint i, j, tmpPos = 0; - int par = 0, graph = 0, retry = 0; + int par = 0, graph = 0; char mclass = 0, block = 0, comment = 0; // comment: 0-no comment 1-inline comment 2-multiline comment 3-string - char macro = 0, macro_pos = 0, func_close = 0; + char macro = 0, func_close = 0; bool structure = false; TQPixmap cls( ( const char** ) class_xpm ); TQPixmap sct( ( const char** ) struct_xpm ); @@ -76,7 +76,6 @@ void KatePluginSymbolViewerView::parseCppSymbols(void) /* *********************** MACRO PARSING *****************************/ if(macro == 1) { - //macro_pos = cl.find("#"); for (j = 0; j < cl.length(); j++) { if(cl.at(j)=='/' && cl.at(j+1)=='/') { macro = 4; break; } @@ -113,7 +112,6 @@ void KatePluginSymbolViewerView::parseCppSymbols(void) node->setText(1, TQString::number( i, 10)); } macro = 0; - macro_pos = 0; stripped = ""; //kdDebug(13000)<<"Macro -- Inserted : "<<stripped<<" at row : "<<i<<endl; if (cl.at(cl.length() - 1) == '\\') macro = 5; // continue in rows below @@ -158,7 +156,7 @@ void KatePluginSymbolViewerView::parseCppSymbols(void) } if (mclass == 3) { - if (cl.find('{') >= 0) + if (cl.find('{') >= 0) { cl = cl.right(cl.find('{')); mclass = 4; @@ -216,8 +214,8 @@ void KatePluginSymbolViewerView::parseCppSymbols(void) break; } - if(cl.at(j)=='{' && structure == false && cl.find(";") < 0 || - cl.at(j)=='{' && structure == false && cl.find('}') > (int)j) + if((cl.at(j)=='{' && structure == false && cl.find(";") < 0) || + (cl.at(j)=='{' && structure == false && cl.find('}') > (int)j)) { stripped.replace(0x9, " "); if(func_on == true) @@ -240,7 +238,7 @@ void KatePluginSymbolViewerView::parseCppSymbols(void) node = new TQListViewItem(mtdNode, lastMtdNode, stripped); lastMtdNode = node; } - else + else { node = new TQListViewItem(clsNode, lastClsNode, stripped); lastClsNode = node; @@ -253,7 +251,6 @@ void KatePluginSymbolViewerView::parseCppSymbols(void) node->setText(1, TQString::number( tmpPos, 10)); } stripped = ""; - retry = 0; block = 3; } if(cl.at(j)=='{' && structure == true) @@ -263,7 +260,6 @@ void KatePluginSymbolViewerView::parseCppSymbols(void) } if(cl.at(j)=='(' && structure == true) { - retry = 1; block = 0; j = 0; //kdDebug(13000)<<"Restart from the beginning of line..."<<endl; @@ -319,7 +315,7 @@ void KatePluginSymbolViewerView::parseCppSymbols(void) } // BLOCK > 0 if (mclass == 4 && block == 0 && func_close == 0) { - if (cl.find('}') >= 0) + if (cl.find('}') >= 0) { cl = cl.right(cl.find('}')); mclass = 0; |