Skip to content

Commit

Permalink
Merge pull request #442 from mmd-osm/patch/cleanup24
Browse files Browse the repository at this point in the history
Header file should use inline instead of anonymous namespace
  • Loading branch information
mmd-osm authored Aug 11, 2024
2 parents dcecebb + f98464c commit 60a55f4
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions include/cgimap/util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@
#include <fmt/core.h>
#include <fmt/format.h>

namespace {

size_t unicode_strlen(const std::string & s)
inline size_t unicode_strlen(const std::string & s)
{
const char* mbstr = s.c_str();

Expand All @@ -44,7 +43,7 @@ size_t unicode_strlen(const std::string & s)
return len;
}

std::string escape(std::string_view input) {
inline std::string escape(std::string_view input) {

int n = 0;

Expand Down Expand Up @@ -75,11 +74,10 @@ std::string escape(std::string_view input) {
}

template <typename T>
std::string to_string(const std::set<T> &ids) {
inline std::string to_string(const std::set<T> &ids) {
return fmt::format("{}", fmt::join(ids, ","));
}

}

// Bounding box
class bbox_t {
Expand Down

0 comments on commit 60a55f4

Please sign in to comment.