BMessage: add default parameter to GetString()/GetBool().
* It's likely that you want NULL/false when the data is not available so you can now leave out the default value in that case.
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2005-2014 Haiku, Inc. All rights reserved.
|
* Copyright 2005-2015 Haiku, Inc. All rights reserved.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
@@ -403,7 +403,7 @@ public:
|
|||||||
|
|
||||||
// Convenience methods
|
// Convenience methods
|
||||||
bool GetBool(const char* name,
|
bool GetBool(const char* name,
|
||||||
bool defaultValue) const;
|
bool defaultValue = false) const;
|
||||||
bool GetBool(const char* name, int32 index,
|
bool GetBool(const char* name, int32 index,
|
||||||
bool defaultValue) const;
|
bool defaultValue) const;
|
||||||
int8 GetInt8(const char* name,
|
int8 GetInt8(const char* name,
|
||||||
@@ -447,7 +447,7 @@ public:
|
|||||||
double GetDouble(const char* name, int32 index,
|
double GetDouble(const char* name, int32 index,
|
||||||
double defaultValue) const;
|
double defaultValue) const;
|
||||||
const char* GetString(const char* name,
|
const char* GetString(const char* name,
|
||||||
const char* defaultValue) const;
|
const char* defaultValue = NULL) const;
|
||||||
const char* GetString(const char* name, int32 index,
|
const char* GetString(const char* name, int32 index,
|
||||||
const char* defaultValue) const;
|
const char* defaultValue) const;
|
||||||
BAlignment GetAlignment(const char* name, int32 index,
|
BAlignment GetAlignment(const char* name, int32 index,
|
||||||
|
|||||||
Reference in New Issue
Block a user