summaryrefslogtreecommitdiff
path: root/Source/UnitTests/Common/CommonFuncsTest.cpp
AgeCommit message (Collapse)Author
2021-07-05treewide: convert GPLv2+ license info to SPDX tagsPierre Bourdon
SPDX standardizes how source code conveys its copyright and licensing information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX tags are adopted in many large projects, including things like the Linux kernel.
2019-06-01Common/CommonFuncs: Remove now-unneccessary ArraySize functionLioncash
Since C++17, non-member std::size() is present in the standard library which also operates on regular C arrays. Given that, we can just replace usages of ArraySize with that where applicable. In many cases, we can just change the actual C array ArraySize() was called on into a std::array and just use its .size() member function instead. In some other cases, we can collapse the loops they were used in, into a ranged-for loop, eliminating the need for en explicit bounds query.
2018-05-10CommonFuncs: Convert ROUND_UP_POW2 macro to a functionLioncash
Also move it to MathUtils where it belongs with the rest of the power-of-two functions. This gets rid of pollution of the current scope of any translation unit with b<value> macros that aren't intended to be used directly.
2017-03-03Common: Move byte swapping utilities into their own headerLioncash
This moves all the byte swapping utilities into a header named Swap.h. A dedicated header is much more preferable here due to the size of the code itself. In general usage throughout the codebase, CommonFuncs.h was generally only included for these functions anyway. These being in their own header avoids dumping the lesser used utilities into scope. As well as providing a localized area for more utilities related to byte swapping in the future (should they be needed). This also makes it nicer to identify which files depend on the byte swapping utilities in particular. Since this is a completely new header, moving the code uncovered a few indirect includes, as well as making some other inclusions unnecessary.
2016-06-24Reformat all the things. Have fun with merge conflicts.Pierre Bourdon
2015-09-03CommonFuncs: Replace ArraySize define with constexpr equivalentLioncash
2015-05-25Update license headers to GPLv2+Tillmann Karras
2014-09-01msvc: get UnitTests compilingShawn Hoffman
Choose it from VS or pass /p:RunUnitTests=true to msbuild
2014-05-29Remove the min/max functions in CommonFuncs.Lioncash
The algorithm header has the same functions.
2014-03-17Tests: fix signed/unsigned comparison warningTillmann Karras
2014-03-09Add more tests for Common and Core/MMIOPierre Bourdon