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:
Adrien Destugues
2014-11-09 13:51:29 +01:00
parent 664372ab49
commit 8007a392cf
2 changed files with 9 additions and 0 deletions
+2
View File
@@ -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);
+7
View File
@@ -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;