mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-21 06:30:16 +00:00
Revert accidental commit.
While this is a fun change, I didn't really test it :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232897 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4b74df7229
commit
f85c601683
@ -238,12 +238,9 @@ namespace llvm {
|
|||||||
/// \returns The index of the first occurrence of \p C, or npos if not
|
/// \returns The index of the first occurrence of \p C, or npos if not
|
||||||
/// found.
|
/// found.
|
||||||
size_t find(char C, size_t From = 0) const {
|
size_t find(char C, size_t From = 0) const {
|
||||||
if (Length != 0) {
|
for (size_t i = std::min(From, Length), e = Length; i != e; ++i)
|
||||||
size_t FindBegin = std::min(From, Length);
|
if (Data[i] == C)
|
||||||
if (const void *Found =
|
return i;
|
||||||
std::memchr(Data + FindBegin, C, Length - FindBegin))
|
|
||||||
return static_cast<const char *>(Found) - Data;
|
|
||||||
}
|
|
||||||
return npos;
|
return npos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user