Skip to content

Commit 98218c6

Browse files
committed
fix linter remarks
Signed-off-by: Paul Gannay <paul.gannay@cea.fr>
1 parent e5be948 commit 98218c6

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/ddc/print.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ struct ChunkPrinter
5454
ChunkPrinter(ChunkPrinter&&) = delete;
5555

5656
private:
57-
ChunkPrinter() {}
57+
ChunkPrinter() = default;
5858

5959
/**
6060
* Print the spaces needed to align value to os
@@ -342,7 +342,7 @@ void print_dim_name(std::ostream& os, DiscreteVector<Dims...> const& dd)
342342
* option is invalid if m_edgeitems >= (m_threshold / 2), in this case the
343343
* format isn't changed.
344344
*/
345-
PrinterOptions set_print_options(PrinterOptions const options = PrinterOptions());
345+
PrinterOptions set_print_options(const PrinterOptions options = PrinterOptions());
346346

347347
/**
348348
* Return the currently used format options
@@ -434,7 +434,7 @@ std::ostream& print_full(
434434
ddc::detail::ChunkPrinter& printer = ddc::detail::ChunkPrinter::get_instance();
435435
std::scoped_lock const lock(printer.m_global_lock);
436436

437-
PrinterOptions old_options
437+
const PrinterOptions old_options
438438
= set_print_options({.threshold = std::numeric_limits<size_t>::max(), .edgeitems = 1});
439439

440440
print_type_info(os, chunk_span);

tests/print.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ void TestPrintFull()
226226
{
227227
// Very restrictive options
228228
ddc::set_print_options({.threshold = 3, .edgeitems = 1});
229-
ddc::PrinterOptions options = ddc::get_print_options();
229+
const ddc::PrinterOptions options = ddc::get_print_options();
230230

231231
unsigned const dim0 = 6;
232232
unsigned const dim1 = 6;
@@ -391,7 +391,7 @@ template <typename ElementType>
391391
void TestPrintCheckCheckIncorrectOptions()
392392
{
393393
// Reset options
394-
ddc::PrinterOptions defaultOptions = ddc::set_print_options();
394+
const ddc::PrinterOptions defaultOptions = ddc::set_print_options();
395395
ddc::PrinterOptions newOptions;
396396

397397
// Test obviously wrong options

0 commit comments

Comments
 (0)