fix logger for ring buffer

This commit is contained in:
chatlanin 2025-01-04 11:44:42 +03:00
parent bc04dc09e9
commit f7e7716df9
2 changed files with 3 additions and 3 deletions

View File

@ -12,7 +12,7 @@ auto main(int argc, char *argv[]) -> int
{ {
// patterns::ring_buffer // patterns::ring_buffer
{ {
hack::patterns::ring_buffer<int, 10> rb; hack::patterns::ring_buffer<int> rb(10);
for (int i = 1; i < 12; ++i) rb.put(i); for (int i = 1; i < 12; ++i) rb.put(i);
hack::log()(rb); hack::log()(rb);
} }

View File

@ -135,8 +135,8 @@ namespace hack
std::cout << data << (count != 0 ? devider : ""); std::cout << data << (count != 0 ? devider : "");
} }
template<typename T, std::size_t size> template<typename T>
static void print_t(const hack::patterns::ring_buffer<T, size>& rb) static void print_t(const hack::patterns::ring_buffer<T>& rb)
{ {
print_t(rb.get_src()); print_t(rb.get_src());
} }