* The previous solution was needlessly complicated.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42201 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2011-06-15 21:07:49 +00:00
parent 535453d97d
commit ed55a28368

View File

@ -2634,14 +2634,10 @@ BMessage::FindString(const char *name, int32 index, BString *string) const
const char *value;
status_t error = FindString(name, index, &value);
if (error != B_OK) {
// Find*() clobbers the object even on failure
string->Truncate(0);
return error;
}
*string = value;
return B_OK;
// Find*() clobbers the object even on failure
string->SetTo(value);
return error;
}