Compare commits

..

2 Commits

Author SHA1 Message Date
Erki
3b2b535ad5 Utility: move fixedpoint class over to the correct namespace
All checks were successful
continuous-integration/drone/push Build is passing
2021-09-19 15:42:23 +03:00
Erki
041276f436 Utility: Add nullsink logger 2021-09-19 15:39:21 +03:00
3 changed files with 11 additions and 4 deletions

View File

@ -6,7 +6,7 @@
#include "utility_fixedpoint.hpp"
using FP15 = Peripherals::FixedPoint<std::uint32_t, 15>;
using FP15 = Utility::FixedPoint<std::uint32_t, 15>;
TEST_CASE("FP constructors work appropriately.", "[utility],[fixed point]")
{
@ -172,7 +172,7 @@ TEST_CASE("FP arithmetic operators work appropriately.", "[utility],[fixed point
TEMPLATE_TEST_CASE("FP converting back to integral values works appropriately.", "[utility],[fixed point]",
std::int8_t, std::int16_t, std::int32_t)
{
using FP = Peripherals::FixedPoint<TestType, 4>;
using FP = Utility::FixedPoint<TestType, 4>;
FP fp(4);

View File

@ -9,7 +9,7 @@
#include <cstdint>
#include <type_traits>
namespace Peripherals
namespace Utility
{
namespace Details
@ -301,6 +301,6 @@ using Q7 = FixedPoint<std::int8_t, 7>;
using Q15 = FixedPoint<std::int16_t, 15>;
using Q31 = FixedPoint<std::int32_t, 31>;
}// namespace Peripherals
}// namespace Utility
#endif//SKULLC_UTILITY_FIXEDPOINT_HPP_

View File

@ -38,6 +38,13 @@ public:
virtual void log(const char* format, ...) = 0;
};
struct NullLogSink : ILogger
{
void log(const char*, ...) override
{
}
};
}// namespace Utility
#endif// SKULLC_UTILITY_ILOGGER_HPP_