Commit Graph

5862 Commits

Author SHA1 Message Date
Daniel Marjamäki 6472588ddd memory leaks : optimising 'simplifycode' 2008-12-24 07:36:18 +00:00
Daniel Marjamäki b16702144e checkclass : simple refactorings. Use Match pattern better. Use str() and simpleMatch instead of Match when possible 2008-12-24 07:03:27 +00:00
Reijo Tomperi 7c236d122a Some comments added 2008-12-23 21:51:54 +00:00
Nicolas Le Cam 14e89fa887 Formatting: demux simpleMatch for readability 2008-12-23 21:45:47 +00:00
Reijo Tomperi a303cf278d Optimization: isNotPattern() removed 2008-12-23 21:20:54 +00:00
Daniel Marjamäki d24913caf8 tokenize : small optimisations. Use simpleMatch and direct std::string comparisons instead of Match 2008-12-23 20:42:44 +00:00
Reijo Tomperi c4ecdf06f0 Optimization, improved Match(). The str[0] == '%' improvement 2008-12-23 20:17:05 +00:00
Nicolas Le Cam b32663324e Fix comparison between signed and unsigned integer expressions warning 2008-12-23 19:54:22 +00:00
Daniel Marjamäki 44b459a98c simplifyKnownVariables : optimisation 2008-12-23 19:39:06 +00:00
Daniel Marjamäki b8e0ea81a6 memory leaks : bug fix 2008-12-23 08:25:16 +00:00
Daniel Marjamäki 5a91a2ea12 simplifyIfAddBraces : Further fixes so that braces will be added to an "else" statement too 2008-12-23 08:11:33 +00:00
Daniel Marjamäki e7d6809cf4 checkbufferoverrun : a bug fix and a better use of Match 2008-12-23 07:50:44 +00:00
Nicolas Le Cam 85239c48a9 Minor optimizations: introduce use of simpleMatch, don't use [simple]Match on one word patterns;
Minor style formattings
2008-12-22 23:27:49 +00:00
Nicolas Le Cam d6ffc63230 Fix FileLister::RecursiveAddFiles on files without a base path. 2008-12-22 22:46:31 +00:00
Daniel Marjamäki 7fda68c662 simplifyIfAddBraces : Added check to cppcheck as it seems to work pretty good now 2008-12-22 20:49:56 +00:00
Daniel Marjamäki c3b9b3dfd5 simplifyIfAddBraces : Fixed a segmentation fault 2008-12-22 19:26:23 +00:00
Daniel Marjamäki 78f46c5848 simplifyIfAddBraces : Fixed minor bug that caused the closing brace to be put on the wrong place 2008-12-22 18:32:04 +00:00
Daniel Marjamäki 3a4e113f64 TestTokenizer : Split the test TestTokenizer::simplifyKnownVariables into 5 separate tests 2008-12-22 18:08:32 +00:00
Daniel Marjamäki 7a3fd268e1 TestTokenizer : Broke up TestTokenizer::ifAddBraces into a few separate tests 2008-12-22 18:05:22 +00:00
Daniel Marjamäki 30c86f7107 simplifyIfAddBraces : Fixed segmentation fault 2008-12-22 18:00:54 +00:00
Daniel Marjamäki a148e67168 Memory leaks : Reduce "if { dealloc ; return ; } if return ;" to "if return ;". Related with bug 2458532 2008-12-22 14:42:54 +00:00
Daniel Marjamäki a69ebc6664 Tokenizer : Added function 'simplifyIfAddBraces' 2008-12-22 09:20:46 +00:00
Nicolas Le Cam ad73e517a4 Fix simpleMatch when pattern only contain one word 2008-12-22 08:20:25 +00:00
Nicolas Le Cam 3234322758 Implement simpleMatch that should be use when pattern contains no flags 2008-12-21 23:28:09 +00:00
Reijo Tomperi 85e6ab5226 More improvement to removeReduntantConditions() and few tests for it also 2008-12-21 21:04:58 +00:00
Reijo Tomperi 496b09a377 Remove reduntant if sentences that are never executed. 2008-12-21 19:24:21 +00:00
Nicolas Le Cam 615095fca2 Optimization: Speed up typedef simplification. 2008-12-21 18:26:06 +00:00
Nicolas Le Cam 1c281662da Fix signed/unsigned warning (thanks Aggro) 2008-12-21 17:51:07 +00:00
Nicolas Le Cam 1f68dfa57e Refactoring: strdup also exists in MSVS 2008-12-21 17:45:05 +00:00
Nicolas Le Cam 1f141e4dc0 Opimization: Remove combineWithNext Member, use an array instead 2008-12-21 17:35:33 +00:00
Reijo Tomperi 56c1a91e67 Few tests added for checking simplify of if sentences 2008-12-21 15:10:44 +00:00
Reijo Tomperi bb198aed5e Fixed bug, varid was not assigned properly when bool use = false; was splitted into two statements in simplify code. 2008-12-21 14:27:07 +00:00
Reijo Tomperi b7db651ee2 Improving simplifyKnownVariables() to simplify bool variables used inside if() like int values are simplified. 2008-12-21 13:58:56 +00:00
Reijo Tomperi aec3584fce Fixed one compiler (gcc) warning. 2008-12-21 12:59:38 +00:00
Nicolas Le Cam 12aceca138 Fix bug I introduced in rv727 2008-12-21 12:22:30 +00:00
Nicolas Le Cam cbf9067de0 Minor optimizations and fixes 2008-12-21 11:43:05 +00:00
Daniel Marjamäki d44523144a simplifyKnownVariables: fixed a segmentation fault 2008-12-21 09:12:00 +00:00
Reijo Tomperi 7c3fbd7060 Fixed bug with redundant condition: http://sourceforge.net/forum/forum.php?thread_id=2711792&forum_id=693501 2008-12-20 22:24:11 +00:00
Daniel Marjamäki a0cee01d35 Memory leak : Updated the multipass checking a little 2008-12-20 21:52:40 +00:00
Reijo Tomperi 2888db49a9 Updated the test to reflect change in previous commit 2008-12-20 21:09:28 +00:00
Reijo Tomperi 8af4efb1df Improved the error message related to virtual destructors 2008-12-20 20:52:15 +00:00
Daniel Marjamäki 92c1914951 refactoring : Replaced "aaaa" with "str" 2008-12-20 19:57:03 +00:00
Daniel Marjamäki bb1691c65f codeblocks : added testmemleakmp 2008-12-20 19:07:20 +00:00
Daniel Marjamäki bf37a1153c memory leak : Added experimental functionality for multipass checking of memory leaks. Only added in the unit tests yet. 2008-12-20 17:52:15 +00:00
Daniel Marjamäki 0a73591c5c Refactoring : Removed the function 'findtoken' 2008-12-20 16:33:14 +00:00
Daniel Marjamäki e0e84d53ac Refactoring : Replaced findtoken with findmatch 2008-12-20 16:30:24 +00:00
Daniel Marjamäki 46631089aa refactoring : Replaced 'findtoken' with 'findmatch' 2008-12-20 16:16:51 +00:00
Daniel Marjamäki 37e8019230 buffer overrun : Refactoring 2008-12-20 16:09:01 +00:00
Daniel Marjamäki 7301709699 buffer overruns : renamed functions + minor simplification 2008-12-20 08:53:42 +00:00
Daniel Marjamäki 6b06df766b Class checking : Renamed the check functions 2008-12-20 08:48:52 +00:00