Skip to content

Commit

Permalink
Return reference to prevent RAII cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
eschan145 committed Jan 22, 2025
1 parent bf9d971 commit fe08f6f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ DK_API void validate() {

uint64_t size = dyknow_size();
std::cout << "DyKnow folder size: " << comma_separated(size)
<< " bytes (" << comma_separated(size / (1024 * 1024)
<< " bytes (" << comma_separated(size / (1024 * 1024))
<< ") " << "MBs.\n";
}

Expand Down
2 changes: 1 addition & 1 deletion src/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ VERSION: 2.1


template <typename T>
std::string& comma_separated(const T& number) {
std::string comma_separated(const T& number) {
static_assert(std::is_arithmetic_v<T>, "Nonnumerical input!");

std::ostringstream oss;
Expand Down

0 comments on commit fe08f6f

Please sign in to comment.