Skip to content

Commit

Permalink
[cleanup] Remove unused method
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy C committed Nov 30, 2023
1 parent f53fc01 commit 2e34cc7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
11 changes: 0 additions & 11 deletions mycpp/gc_str.cc
Expand Up @@ -533,17 +533,6 @@ unsigned BigStr::hash(HashFunc h) {
return hash_;
}

// for raw_input() to look like GNU readline
void BigStr::RemoveNewlineHack() {
CHECK(data_[len_ - 1] == '\n');

// This is done before using the string, string can't be hashed
DCHECK(is_hashed_ == 0);

data_[len_ - 1] = '\0';
len_--;
}

static inline BigStr* _StrFormat(const char* fmt, int fmt_len, va_list args) {
auto beg = std::cregex_iterator(fmt, fmt + fmt_len, gStrFmtRegex);
auto end = std::cregex_iterator();
Expand Down
3 changes: 0 additions & 3 deletions mycpp/gc_str.h
Expand Up @@ -58,9 +58,6 @@ class BigStr {
BigStr* upper();
BigStr* lower();

// for raw_input() to look like GNU readline
void RemoveNewlineHack();

// Other options for fast comparison / hashing / string interning:
// - unique_id_: an index into intern table. I don't think this works unless
// you want to deal with rehashing all strings when the set grows.
Expand Down

0 comments on commit 2e34cc7

Please sign in to comment.