Skip to content

Commit fc4eab5

Browse files
committed
util/StringBuilder: pass buffer as const pointer to ToStringView()
This allows passing a constified reference of the buffer.
1 parent 5b8e728 commit fc4eab5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/util/StringBuilder.hxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public:
116116
UnsafeFill(ch, n);
117117
}
118118

119-
constexpr std::string_view ToStringView(std::span<value_type> buffer) const noexcept {
119+
constexpr std::string_view ToStringView(std::span<const value_type> buffer) const noexcept {
120120
return {buffer.data(), p};
121121
}
122122
};

0 commit comments

Comments
 (0)