Martchus
07e9546855
Avoid relying on compiler optimizations for binary conversions
...
* Add/update binary conversion functions to use `std::memcopy`
* Only GCC could actually optimize the custom code using bit operations
* Clang could only optimize the `getBytes()` functions
* MSVC could not optimize any of the functions
* The to…Int…() functions cannot be updated as they are `constexpr` (and
thus `std::memcopy` and `reinterpret_cast` cannot be used). So they stay
as-is and `toInt()` has been added instead
* The `BinaryReader` class has been updated to use the new `toInt()`
function
2023-02-05 21:29:22 +01:00
Martchus
8588c17df3
Remove wrong includes in `binaryconversionprivate.h`
...
This header is not meant to be self-contained and must not include any
other headers.
2023-02-05 19:57:36 +01:00
Martchus
8c033ca243
Fix warnings
2021-03-20 21:56:45 +01:00
Martchus
9a50d2b8df
Remove types
2019-04-13 20:33:39 +02:00
Martchus
a21ed51505
Improve coding style in toFloat{32,64}() functions
...
* Use const
* Don't duplicate BE/LE branches
2018-05-31 22:45:45 +02:00
Martchus
d174f3f157
Make toInt() functions constexpr
2018-05-31 22:43:35 +02:00
Martchus
59e20b1043
Apply clang-format
2017-05-01 03:13:11 +02:00
Martchus
cab332bcad
Refactor reading arguments
...
Replace ArgumentParser::readSpecifiedArgs() with
ArgumentReader class to simplify argument list
2016-12-23 22:40:33 +01:00
Martchus
d6b08b8ed9
Fix decoration for static builds
...
- Also add improvemnts a few other things in the build system
2016-08-29 15:35:48 +02:00
Martchus
d04a0fe1a9
added {BE,LE}::getBytes24()
...
({BE,LE}::toUInt24() counterpart)
2016-01-25 23:59:05 +01:00
Martchus
a8f7644350
minor adjustments
2016-01-18 23:41:30 +01:00
Martchus
4d6bf67188
fixed includes
2015-09-06 20:19:09 +02:00
Martchus
603dbf823a
fixed includes
2015-09-06 15:30:16 +02:00
Martchus
6f5546200c
fixed toFloat32
2015-08-13 03:18:11 +02:00
Martchus
c62e25ee2a
improved conversion utilities
2015-07-18 01:11:12 +02:00
Martchus
24ba96a17f
First commit
2015-04-22 18:36:40 +02:00