Sébastien Villemot
4ef9245a95
MEX files: remove calls to virtual method during construction
...
Such calls may bypass virtual dispatch.
Automatically detected by clang-tidy with
clang-analyzer-optin.cplusplus.VirtualCall check.
2023-12-07 18:34:38 +01:00
Sébastien Villemot
91c677ca7f
MEX files: drop C++ preprocessor directives now obsolete
...
Dynare++ is no longer distributed as a standalone binary.
2023-12-07 17:57:01 +01:00
Sébastien Villemot
91f2dcdfe1
MEX files: use “auto” when initializing with a template cast to avoid duplicating the type name
...
Automatically detected by clang-tidy with modernize-use-auto check.
2023-12-06 22:24:56 +01:00
Sébastien Villemot
de476ad5ac
MEX files: use a braced initializer list instead of repeating the return type
...
Automatically detected by clang-tidy with modernize-return-braced-init-list
check.
2023-12-06 22:24:55 +01:00
Sébastien Villemot
123f909b67
MEX files: use pass-by-value + std::move when possible in constructors
...
Automatically detected by clang-tidy with modernize-pass-by-value check.
2023-12-06 22:24:55 +01:00
Sébastien Villemot
fd9a89ab38
MEX files: use default member initialization when possible
...
Automatically detected by clang-tidy with modernize-use-default-member-init
check.
2023-12-06 22:24:55 +01:00
Sébastien Villemot
9d98811cfc
MEX files: use transparent functor for std::multiplies
...
Automatically detected by clang-tidy using modernize-use-transparent-functors
check.
2023-12-06 22:24:55 +01:00
Sébastien Villemot
11c1f6175e
Add [[nodiscard]] attribute to various functions
...
Automatically detected using clang-tidy with modernize-use-nodiscard check.
2023-12-05 15:44:23 +01:00
Sébastien Villemot
bc6840ff6f
MEX libkorder: make destructor of SparseTensor class virtual
...
That class is a base class, so it must have a virtual destructor to avoid
memory leaks.
Issue detected by clang-tidy with
clang-diagnostic-delete-non-abstract-non-virtual-dtor check.
2023-12-04 18:20:43 +01:00
Sébastien Villemot
aeec4494b0
MEX libkorder: fix use of moved-from object
...
Detected by clang-tidy using clang-analyzer-cplusplus.Move check.
2023-12-04 18:20:43 +01:00
Sébastien Villemot
403f20a7f3
C++ modernization: add [[nodiscard]] attribute to various functions
...
Automatically detected and fixed using clang-tidy with modernize-use-nodiscard
check.
2023-12-04 18:20:42 +01:00
Sébastien Villemot
c6a7801ba8
clang-format configuration: set “PackConstructorInitializers: NextLine”
2023-11-30 14:37:05 +01:00
Sébastien Villemot
ed332e3ba1
MEX files: reformat C++ source code using clang-format 15
2023-11-29 19:00:51 +01:00
Sébastien Villemot
e0bc9f29a1
Remove warnings about unused parameters (-Wunused-parameter)
2023-09-20 16:30:02 +02:00
Sébastien Villemot
6dd55726e6
Drop autoconf/automake build system
2023-09-20 15:33:44 +02:00
Sébastien Villemot
5b8b63924d
Remove unneeded braces
2023-07-19 18:03:18 +02:00
Sébastien Villemot
661e5c7e9f
C++17 modernization: initialization in “if”-statement
2023-07-19 18:03:03 +02:00
Sébastien Villemot
1b02026d1c
Fix GCC 13 warning about overloading that hides virtual methods of base class
2023-05-09 21:36:43 +02:00
Sébastien Villemot
aeff2bf48d
Fix GCC 13 warning about ambiguity of operator==() in C++20
...
In C++20, a==b can also be implicitly rewritten as b==a, assuming
commutativity. But if the operator==(const &) is not declared as const, and is
thus asymmetric, this results in an ambiguity because neither of a==b or b==a
is a better match according to the overload resolution rules.
2023-05-09 21:36:41 +02:00
Sébastien Villemot
73e4ced39a
Remove more unused Dynare++ code
...
In particular, the libkorder library no longer depends on MatIO.
2023-04-17 18:10:36 +02:00
Sébastien Villemot
99cd06c9fd
Move relevant Dynare++ files to mex/sources/libkorder/. Delete the others.
...
Also move some useful documentation to doc/.
2023-04-17 18:10:35 +02:00