Commit Graph

15 Commits

Author SHA1 Message Date
PKEuS ec1bd420a7 Refactorizations optimizing std::string usage:
1) Added global static const std::string emptyString; object:
-> Replaces some static variables in functions which might be not threadsafe
-> Avoids constructor call (std::string::string(""))
-> Even functions that return an empty string in some branches can return by reference now.
Added to config.h to ensure that it is available everywhere

2) Added overloads for TestFixture::assertEquals for the most common use cases:
-> Moves conversion from const char[] to std::string into a function, reducing code duplication in binary.
2014-06-26 11:51:02 +02:00
PKEuS 1b5d127373 Cache results for TokenList::isC() and TokenList::isCPP() to avoid redundant calls to Path::isCPP()/isC(), which perform slow string operations (conversion to lowercase, substring, comparisons)
-> Speedup of 2% on self-checking cppcheck-core (MSVC12, x64, not matchcompiled)
2014-06-24 17:42:39 +02:00
PKEuS d93d7401c6 Moved getSourceFilePath(), isC() and isCPP() from Tokenizer to TokenList
Conflicts:
	lib/tokenize.cpp
2014-06-04 18:36:25 +02:00
Frank Zingsheim 5e0a575091 Optimization: tokenlist::addtoken 2014-03-09 17:54:49 +01:00
Daniel Marjamäki fd3a8a2a18 Update copyright 2014-02-15 07:45:39 +01:00
Kamil Dudka dee18d10a8 Fixed #5423 (fix parsing of #line NNNN "file.c") 2014-01-28 17:15:07 +01:00
Daniel Marjamäki de29991c11 AST: Rewrite using standard approach 2013-11-04 11:26:16 +01:00
Ettl Martin 9ab6655d85 Fixed #5007 (Same include guard naming) 2013-09-04 20:59:49 +02:00
Daniel Marjamäki e3dd51dd2b Fixed Cppcheck warning. Method TokenList::createAst can be const 2013-06-01 15:04:37 +02:00
PKEuS 14feaa8d39 Refactorizations:
- Fixed lots of cppcheck messages about functions that can be const or static
- Fixed possible nullpointer dereference message in symboldatabase.cpp
- Replaced tokAt(+-1) by next()/previous()
2013-03-12 07:42:00 -07:00
Reijo Tomperi 5d5f7085bf Updating year 2012 -> 2013 to .cpp and .h files and man page. 2013-01-01 18:29:08 +02:00
Daniel Marjamäki fa8e5cd7d8 AST: Simple AST. Not used in the clients. Only part of the testing for now. 2012-12-15 20:21:09 +01:00
Reijo Tomperi 7ddd564ad6 Change file encoding to UFT-8 like it is for other files. 2012-08-26 00:12:38 +03:00
PKEuS 4b80e91145 Implemented support for building cppcheck lib into a dll
Updated VS9 solution
New VS10 solution that builds cppcheck into a dll used by cli and testrunner.
Functional changes and advantages of new solution:
- Share code between testrunner and cli; ability to share code with gui as well (not yet implemented)
- Files of /lib are no longer compiled twice (should improve build time on single core machines)
- Added configuration for building with PCRE support
- Executables are build into /bin (/bin/debug in debug mode) folder (Should no longer require rebuild when switching between debug and release)
- Completely x64 compatible (contains also x64-debug configuration now)
2012-06-10 05:19:09 -07:00
PKEuS 1a5fbd61d2 Splitted class TokenList from Tokenizer 2012-05-05 09:33:26 -07:00