mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 01:48:05 +00:00
Bug 1492272 - Get rid of Begin/EndWriting(iterator&) string functions. r=froydnj
This removes the rarely used and somewhat odd `iterator& BeginWriting/EndWriting(iterator&)` functions that take an iterator as an in/out param and then return it. --HG-- extra : rebase_source : 92066f996595e9b7df9642813c08592cee47c630
This commit is contained in:
parent
2fb6934934
commit
513dbaad87
@ -781,8 +781,7 @@ nsStandardURL::BuildNormalizedSpec(const char *spec,
|
||||
// approxLen should be correct or 1 high
|
||||
if (!mSpec.SetLength(approxLen+1, fallible)) // buf needs a trailing '\0' below
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
char *buf;
|
||||
mSpec.BeginWriting(buf);
|
||||
char *buf = mSpec.BeginWriting();
|
||||
uint32_t i = 0;
|
||||
int32_t diff = 0;
|
||||
|
||||
|
@ -220,10 +220,8 @@ nsLocalFile::GetRelativeDescriptor(nsIFile* aFromFile, nsACString& aResult)
|
||||
}
|
||||
|
||||
// get raw pointer to mutable string buffer
|
||||
char16_t* thisPathPtr;
|
||||
thisPath.BeginWriting(thisPathPtr);
|
||||
char16_t* fromPathPtr;
|
||||
fromPath.BeginWriting(fromPathPtr);
|
||||
char16_t* thisPathPtr = thisPath.BeginWriting();
|
||||
char16_t* fromPathPtr = fromPath.BeginWriting();
|
||||
|
||||
SplitPath(thisPathPtr, thisNodes);
|
||||
SplitPath(fromPathPtr, fromNodes);
|
||||
|
@ -393,26 +393,6 @@ public:
|
||||
return EnsureMutable() ? (base_string_type::mData + base_string_type::mLength) : iterator(0);
|
||||
}
|
||||
|
||||
iterator& BeginWriting(iterator& aIter)
|
||||
{
|
||||
return aIter = BeginWriting();
|
||||
}
|
||||
|
||||
iterator& BeginWriting(iterator& aIter, const fallible_t& aFallible)
|
||||
{
|
||||
return aIter = BeginWriting(aFallible);
|
||||
}
|
||||
|
||||
iterator& EndWriting(iterator& aIter)
|
||||
{
|
||||
return aIter = EndWriting();
|
||||
}
|
||||
|
||||
iterator& EndWriting(iterator& aIter, const fallible_t& aFallible)
|
||||
{
|
||||
return aIter = EndWriting(aFallible);
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform string to int conversion.
|
||||
* @param aErrorCode will contain error if one occurs
|
||||
|
Loading…
Reference in New Issue
Block a user