* 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:
@@ -2634,14 +2634,10 @@ BMessage::FindString(const char *name, int32 index, BString *string) const
|
|||||||
|
|
||||||
const char *value;
|
const char *value;
|
||||||
status_t error = FindString(name, index, &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;
|
// Find*() clobbers the object even on failure
|
||||||
return B_OK;
|
string->SetTo(value);
|
||||||
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user