22 Commits

Author SHA1 Message Date
gtsoul-tech
0f4369bf22
Bug fix/clang-tidy-performance (#300)
Various clang-tidy-performance fixes:
* noexcept
* performance-noexcept-swap
* performance
* performance-move-const-arg
* performance-unnecessary-value-param
* performance-inefficient-vector-operation
* performance-no-int-to-ptr
* add performance
* performance-inefficient-string-concatenation
* clang-analyzer-deadcode.DeadStores
* performance-inefficient-vector-operation
* clang-analyzer-core.NullDereference
* clang-analyzer-core.UndefinedBinaryOperatorResult
* clang-analyzer-core.CallAndMessage

---------

Co-authored-by: gtsoul-tech <gtsoulkanakis@gmail.com>
2024-06-20 14:57:19 +03:00
Konstantinos Margaritis
c837925087
Fix/Suppress remaining Cppcheck warnings (#291)
Fix/suppress the following cppcheck warnings:

* arithOperationsOnVoidPointer
* uninitMember
* const*
* shadowVariable
* assignmentIntegerToAddress
* containerOutOfBounds
* pointer-related warnings in Ragel source
* missingOverride
* memleak
* knownConditionTrueFalse
* noExplicitConstructor
* invalidPrintfArgType_sint
* useStlAlgorithm
* cstyleCast
* clarifyCondition
* VSX-related cstyleCast
* unsignedLessThanZero 

Furthermore, we added a suppression list to be used, which also includes the following:
* missingIncludeSystem
* missingInclude
* unmatchedSuppression
2024-05-27 12:23:02 +03:00
gtsoul-tech
5ad1f2127f constVariablePointer 2024-05-02 14:30:18 +03:00
g. economou
727cff3621
Merge branch 'develop' into wip-isildur-g-cppcheck-47-48-58 2024-05-01 10:59:59 +03:00
G.E
9902ca0e34 addressing 47 [constParameterReference],48 [constVariableReference],58
[constVariable]
2024-05-01 10:54:15 +03:00
G.E
7fd45f864c next batch for cppeheck, addressing syntaxError and
constParameterPointer
2024-04-24 17:32:09 +03:00
Konstantinos Margaritis
0d2f9ccbaa Fix 'unqualified call to std::move' errors in clang 15+ 2023-10-03 20:24:39 +03:00
Konstantinos Margaritis
e35b88f2c8 use STL make_unique, remove wrapper header, breaks C++17 compilation 2021-10-12 11:51:34 +03:00
Konstantinos Margaritis
556206f138 replace push_back by emplace_back where possible 2021-10-12 11:51:33 +03:00
Justin Viiret
9cf66b6ac9 util: switch from Boost to std::unordered set/map
This commit replaces the ue2::unordered_{set,map} types with their STL
versions, with some new hashing utilities in util/hash.h. The new types
ue2_unordered_set<T> and ue2_unordered_map<Key, T> default to using the
ue2_hasher.

The header util/ue2_containers.h has been removed, and the flat_set/map
containers moved to util/flat_containers.h.
2017-08-21 11:14:55 +10:00
Justin Viiret
a659b9b686 slot_manager_dump: use StdioFile 2017-08-21 11:12:16 +10:00
Justin Viiret
a197074c5d nfa: switch to using bytecode_ptr<NFA> 2017-04-26 15:19:36 +10:00
Justin Viiret
1ef87c43ee noncopyable: switch over from boost 2017-04-26 15:18:26 +10:00
Justin Viiret
7d23a7e2d3 som: move som_type into namespace ue2 2017-04-26 15:18:26 +10:00
Alex Coyte
e1e9010cac Introduce custom adjacency-list based graph 2016-12-02 11:31:33 +11:00
Justin Viiret
9f98f4c7b2 nfa: standardise callback start, end naming 2016-07-08 11:02:05 +10:00
Justin Viiret
cf9e40ae1c nfa: unify NfaCallback and SomNfaCallback
Use just one callback type, with both start and end offsets.
2016-07-08 11:01:56 +10:00
Justin Viiret
36150bbc19 Rose: replace internal_report with program
Replace the use of the internal_report structure (for reports from
engines, MPV etc) with the Rose program interpreter.

SOM processing was reworked to use a new som_operation structure that is
embedded in the appropriate instructions.
2016-04-20 13:34:57 +10:00
Justin Viiret
58f9617f66 NFA API: Remove nfaBlockExecReverse scratch arg
Scratch is no longer used by this function's implementations.
2016-03-01 11:34:38 +11:00
Justin Viiret
9e9bb6a960 Rose: pack global state bits into one u8
Eliminate the RoseRuntimeState structure in favour of a single status
byte that is stored in scratch and copied to/from stream state.
2016-03-01 11:32:01 +11:00
Justin Viiret
060defe6c4 Rose: move more report handling work into program
Move report preconditions (bounds, exhaustion, etc) into program
instructions and use a more direct path to the user match callback than
the adaptor functions.

Report handling has been moved to new file src/report.h. Reporting from
EOD now uses the same instructions as normal report handling, rather
than its own.

Jump target tracking in rose_build_bytecode.cpp has been cleaned up.
2016-03-01 11:32:01 +11:00
Matthew Barr
904e436f11 Initial commit of Hyperscan 2015-10-20 09:13:35 +11:00