BMessage: add AddFlat taking a const BFlattenable
It seems the const was forgotten in the BeOS version. But there is no reason not to have it.
This commit is contained in:
@@ -163,6 +163,8 @@ public:
|
||||
const BMessage* message);
|
||||
status_t AddFlat(const char* name, BFlattenable* object,
|
||||
int32 count = 1);
|
||||
status_t AddFlat(const char* name,
|
||||
const BFlattenable* object, int32 count = 1);
|
||||
status_t AddData(const char* name, type_code type,
|
||||
const void* data, ssize_t numBytes,
|
||||
bool isFixedSize = true, int32 count = 1);
|
||||
|
||||
@@ -2730,6 +2730,13 @@ BMessage::AddMessage(const char* name, const BMessage* message)
|
||||
|
||||
status_t
|
||||
BMessage::AddFlat(const char* name, BFlattenable* object, int32 count)
|
||||
{
|
||||
return AddFlat(name, (const BFlattenable*)object, count);
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
BMessage::AddFlat(const char* name, const BFlattenable* object, int32 count)
|
||||
{
|
||||
if (object == NULL)
|
||||
return B_BAD_VALUE;
|
||||
|
||||
Reference in New Issue
Block a user