Skip to content

Commit

Permalink
Added const qualifier to StringRef::edit_distance member function
Browse files Browse the repository at this point in the history
Patch by Ismail Pazarbasi.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189162 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
gribozavr committed Aug 24, 2013
1 parent cbbd1ee commit 4a48389
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/llvm/ADT/StringRef.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ namespace llvm {
/// transform one of the given strings into the other. If zero,
/// the strings are identical.
unsigned edit_distance(StringRef Other, bool AllowReplacements = true,
unsigned MaxEditDistance = 0);
unsigned MaxEditDistance = 0) const;

/// str - Get the contents as an std::string.
std::string str() const {
Expand Down
2 changes: 1 addition & 1 deletion lib/Support/StringRef.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ int StringRef::compare_numeric(StringRef RHS) const {
// Compute the edit distance between the two given strings.
unsigned StringRef::edit_distance(llvm::StringRef Other,
bool AllowReplacements,
unsigned MaxEditDistance) {
unsigned MaxEditDistance) const {
return llvm::ComputeEditDistance(
llvm::ArrayRef<char>(data(), size()),
llvm::ArrayRef<char>(Other.data(), Other.size()),
Expand Down

0 comments on commit 4a48389

Please sign in to comment.