Skip to content

Commit 52b53ca

Browse files
author
nullccxsy
committed
fix comments
1 parent ef5c1cf commit 52b53ca

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

src/iceberg/schema.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
#include "iceberg/type.h"
2727
#include "iceberg/util/formatter.h" // IWYU pragma: keep
2828
#include "iceberg/util/macros.h"
29-
#include "iceberg/util/string_utils.h"
3029
#include "iceberg/util/visit_type.h"
3130

3231
namespace iceberg {

src/iceberg/schema.h

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,10 @@
3232
#include "iceberg/result.h"
3333
#include "iceberg/schema_field.h"
3434
#include "iceberg/type.h"
35+
#include "iceberg/util/string_utils.h"
3536

3637
namespace iceberg {
3738

38-
/// \brief Transparent hash function that supports std::string_view as lookup key
39-
///
40-
/// Enables std::unordered_map to directly accept std::string_view lookup keys
41-
/// without creating temporary std::string objects, using C++20's transparent lookup.
42-
struct string_hash {
43-
using hash_type = std::hash<std::string_view>;
44-
using is_transparent = void;
45-
46-
std::size_t operator()(std::string_view str) const { return hash_type{}(str); }
47-
};
48-
4939
/// \brief A schema for a Table.
5040
///
5141
/// A schema is a list of typed columns, along with a unique integer ID. A

src/iceberg/util/string_util.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,15 @@ class ICEBERG_EXPORT StringUtils {
4646
}
4747
};
4848

49+
/// \brief Transparent hash function that supports std::string_view as lookup key
50+
///
51+
/// Enables std::unordered_map to directly accept std::string_view lookup keys
52+
/// without creating temporary std::string objects, using C++20's transparent lookup.
53+
struct string_hash {
54+
using hash_type = std::hash<std::string_view>;
55+
using is_transparent = void;
56+
57+
std::size_t operator()(std::string_view str) const { return hash_type{}(str); }
58+
};
59+
4960
} // namespace iceberg

0 commit comments

Comments
 (0)