Collection of inconsistencies after initial assessment incl. potential for modernization
Dear all,
This issue is a container for all the little changes I would like to propose or discuss after my initial assessment of the code base.
-
IsEqualis notnoexcept, but used innoexceptfunc, see floating_point_helper.h:40 -
add overridekeyword, e. g. i_entity.h:101,107 -
add closing comments on namespaces, e. g. orientation.h:32 -
discuss include style ""vs.<> -
discuss ostream operators for all types -
discuss the rule of three/five/zero, e. g. i_geometry_helper.h:28, see The rule of three/five/zero and C.21: If you define or =delete any copy, move, or destructor function, define or =delete them all -
discuss trailing return type -
fix/explain IControllerConfigcopy ctor (std::make_uniqueon raw pointer intostd::vector<std::shared_ptr<>>) -
fix var and param naming, e. g. poly_line.h:36 -
harmonize enum class defs, e. g. weather.hvs.control_strategy.hvs.entity_properties.h -
harmonize operator defs (some are friends, some are members etc.) -
if possible, use constexprfor operators, e. g. orientation.h:84 -
improve floating point comparison, see Comparing Floating Point Numbers, 2012 Edition -
include what you use, e. g. time_utils.his missing#include <chrono> -
introduce nodiscardkeyword, e. g. i_geometry_helper.h:37 -
introduce ClangTidy, see #6 (closed) and !7 (closed) -
Move SetSpeedtoIEntity, see #8 -
reduce dir depth (move includeandtestto root dir) -
reduce magic numbers, e. g. road_condition.h:32 -
reduce using directives, see #5 (closed) -
remove superfluous ctors, e. g. vector.h:27,29 -
remove superfluous default init values, e. g. i_controller_config.h:46 -
use = defaultfor ctors/dtors, e. g. i_controller_config.h:46 -
use auto, apply AAA rule, see GotW #94 Special Edition: AAA Style (Almost Always Auto) -
use std::tiefor comparison, e. g. entity_properties.h:168 -
use usinginstead oftypedef, e. g. orientation.h:31
After discussion, this issue can be split into smaller chunks for resolution.
Regards, Martin
Martin Stump martin.stump@mercedes-benz.com on behalf of Mercedes-Benz Tech Innovation GmbH, Provider Information
Edited by Martin Stump