Skip to content

Commit

Permalink
Fix misc-use-anonymous-namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
rmisev committed Aug 6, 2024
1 parent 2ed1720 commit 721d572
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/idna.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

namespace upa { // NOLINT(modernize-concat-nested-namespaces)
namespace idna {
namespace {

// Split

Expand All @@ -36,10 +37,10 @@ enum BidiRes : int {
IsBidiError = 0x02
};

static bool validate_label(const char32_t* label, const char32_t* label_end, Option options, bool full_check, int& bidiRes);
static bool validate_bidi(const char32_t* label, const char32_t* label_end, int& bidiRes);
bool validate_label(const char32_t* label, const char32_t* label_end, Option options, bool full_check, int& bidiRes);
bool validate_bidi(const char32_t* label, const char32_t* label_end, int& bidiRes);

static bool processing_mapped(std::u32string* pdecoded, const std::u32string& mapped, Option options) {
bool processing_mapped(std::u32string* pdecoded, const std::u32string& mapped, Option options) {
using namespace util;

bool error = false;
Expand Down Expand Up @@ -86,7 +87,7 @@ static bool processing_mapped(std::u32string* pdecoded, const std::u32string& ma
return !error;
}

static bool validate_label(const char32_t* label, const char32_t* label_end, Option options, bool full_check, int& bidiRes) {
bool validate_label(const char32_t* label, const char32_t* label_end, Option options, bool full_check, int& bidiRes) {
using namespace util;

if (label != label_end) {
Expand Down Expand Up @@ -195,7 +196,7 @@ inline bool is_bidi(const char32_t* first, const char32_t* last) {
return false;
}

static bool validate_bidi(const char32_t* label, const char32_t* label_end, int& bidiRes) {
bool validate_bidi(const char32_t* label, const char32_t* label_end, int& bidiRes) {
using namespace util;

// To check rules the label must have at least one character
Expand Down Expand Up @@ -285,9 +286,6 @@ static bool validate_bidi(const char32_t* label, const char32_t* label_end, int&
return true;
}

namespace detail {
namespace {

template <class InputIt>
inline void str_append(std::string& dest, InputIt first, InputIt last) {
#ifdef _MSC_VER
Expand All @@ -305,6 +303,7 @@ inline void str_append(std::string& dest, InputIt first, InputIt last) {

} // namespace

namespace detail {

bool to_ascii_mapped(std::string& domain, const std::u32string& mapped, Option options) {
// A1
Expand Down

0 comments on commit 721d572

Please sign in to comment.