Skip to content

Commit 610e85c

Browse files
committed
Add Clear() function for RowKeyType to unblock LSC
Adds Clear(std::string& key) function that calls std::string::clear() in OSS builds. Google-land will have corresponding overload for absl::Cord::Clear() to replace deprecated absl::Cord::clear(). Signed-off-by: Dorna Raj Gyawali <dronarajgyawali@gmail.com>
1 parent 81c1d01 commit 610e85c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

google/cloud/bigtable/internal/google_bytes_traits.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ namespace internal {
3838
/// Return true if the row key is empty.
3939
inline bool IsEmptyRowKey(std::string const& key) { return key.empty(); }
4040

41+
/// Clear the row key.
42+
inline void Clear(std::string& key) { key.clear(); }
43+
4144
/// Return true if the row key is empty.
4245
inline bool IsEmptyRowKey(char const* key) { return std::string{} == key; }
4346

0 commit comments

Comments
 (0)