[ICU-7] remove :: for icu_mem...() (and remove unnecessary icu_memset())

X-Commit-URL: https://ssl.icu-project.org/trac/changeset/99
This commit is contained in:
Markus Scherer 1999-10-22 00:41:21 +00:00
parent 725e37f1f1
commit 5c90ea030a

View file

@ -63,8 +63,7 @@ CollationKey::CollationKey(const uint8_t* newValues, int32_t count)
return;
}
::icu_memset(fBytes, 0, fCount);
::icu_memcpy(fBytes, newValues, fCount);
icu_memcpy(fBytes, newValues, fCount);
}
CollationKey::CollationKey(const UnicodeString& value)
@ -90,8 +89,10 @@ CollationKey::CollationKey(const CollationKey& other)
return;
}
::icu_memset(fBytes, 0, fCapacity);
::icu_memcpy(fBytes, other.fBytes, other.fCount);
icu_memcpy(fBytes, other.fBytes, other.fCount);
if(fCapacity>fCount) {
icu_memset(fBytes+fCount, 0, fCapacity-fCount);
}
}
CollationKey::~CollationKey()
@ -129,7 +130,7 @@ CollationKey::operator==(const CollationKey& source) const
{
return (this->fCount == source.fCount &&
(this->fBytes == source.fBytes ||
::icu_memcmp(this->fBytes, source.fBytes, this->fCount) == 0));
icu_memcmp(this->fBytes, source.fBytes, this->fCount) == 0));
}
const CollationKey&
@ -152,7 +153,7 @@ CollationKey::operator=(const CollationKey& other)
}
fHashCode = other.fHashCode;
::icu_memcpy(fBytes, other.fBytes, fCount);
icu_memcpy(fBytes, other.fBytes, fCount);
}
else
{
@ -190,7 +191,7 @@ CollationKey::compareTo(const CollationKey& target) const
return Collator::EQUAL;
}
int result = ::icu_memcmp(this->fBytes, target.fBytes, count);
int result = icu_memcmp(this->fBytes, target.fBytes, count);
if (result < 0)
{
@ -219,7 +220,7 @@ CollationKey::ensureCapacity(int32_t newSize)
return setToBogus();
}
::icu_memset(fBytes, 0, fCapacity);
icu_memset(fBytes, 0, fCapacity);
fCapacity = newSize;
}
@ -299,8 +300,7 @@ CollationKey::toByteArray(int32_t& count) const
else
{
count = fCount;
::icu_memset(result, 0, fCount);
::icu_memcpy(result, fBytes, fCount);
icu_memcpy(result, fBytes, fCount);
}
return result;