mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-19 04:32:19 +00:00
Added const qualifier to StringRef::edit_distance member function
Patch by Ismail Pazarbasi. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189162 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cbbd1eeecb
commit
4a48389b27
@ -175,7 +175,7 @@ namespace llvm {
|
|||||||
/// transform one of the given strings into the other. If zero,
|
/// transform one of the given strings into the other. If zero,
|
||||||
/// the strings are identical.
|
/// the strings are identical.
|
||||||
unsigned edit_distance(StringRef Other, bool AllowReplacements = true,
|
unsigned edit_distance(StringRef Other, bool AllowReplacements = true,
|
||||||
unsigned MaxEditDistance = 0);
|
unsigned MaxEditDistance = 0) const;
|
||||||
|
|
||||||
/// str - Get the contents as an std::string.
|
/// str - Get the contents as an std::string.
|
||||||
std::string str() const {
|
std::string str() const {
|
||||||
|
@ -85,7 +85,7 @@ int StringRef::compare_numeric(StringRef RHS) const {
|
|||||||
// Compute the edit distance between the two given strings.
|
// Compute the edit distance between the two given strings.
|
||||||
unsigned StringRef::edit_distance(llvm::StringRef Other,
|
unsigned StringRef::edit_distance(llvm::StringRef Other,
|
||||||
bool AllowReplacements,
|
bool AllowReplacements,
|
||||||
unsigned MaxEditDistance) {
|
unsigned MaxEditDistance) const {
|
||||||
return llvm::ComputeEditDistance(
|
return llvm::ComputeEditDistance(
|
||||||
llvm::ArrayRef<char>(data(), size()),
|
llvm::ArrayRef<char>(data(), size()),
|
||||||
llvm::ArrayRef<char>(Other.data(), Other.size()),
|
llvm::ArrayRef<char>(Other.data(), Other.size()),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user