[haiku-commits] BRANCH axeld-github.network-preferences [3c89e7f782bc] headers/os/app

  • From: axeld-github.network-preferences <community@xxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 26 Feb 2015 10:01:36 +0100 (CET)

added 1 changeset to branch 'refs/remotes/axeld-github/network-preferences'
old head: 5299847fbfe1409ace441aefbeac9d101b181b8a
new head: 3c89e7f782bcf786adc08dc9ebd974ece0364182
overview: https://github.com/axeld/haiku/compare/5299847fbfe1...3c89e7f782bc

----------------------------------------------------------------------------

3c89e7f782bc: 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.

                                   [ Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> ]

----------------------------------------------------------------------------

Commit:      3c89e7f782bcf786adc08dc9ebd974ece0364182
Author:      Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
Date:        Thu Feb 26 09:54:00 2015 UTC

----------------------------------------------------------------------------

1 file changed, 3 insertions(+), 3 deletions(-)
headers/os/app/Message.h | 6 +++---

----------------------------------------------------------------------------

diff --git a/headers/os/app/Message.h b/headers/os/app/Message.h
index 0f7e585..7d7eab4 100644
--- a/headers/os/app/Message.h
+++ b/headers/os/app/Message.h
@@ -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.
  *
  * Authors:
@@ -403,7 +403,7 @@ public:
 
        // Convenience methods
                        bool                            GetBool(const char* 
name,
-                                                                       bool 
defaultValue) const;
+                                                                       bool 
defaultValue = false) const;
                        bool                            GetBool(const char* 
name, int32 index,
                                                                        bool 
defaultValue) const;
                        int8                            GetInt8(const char* 
name,
@@ -447,7 +447,7 @@ public:
                        double                          GetDouble(const char* 
name, int32 index,
                                                                        double 
defaultValue) const;
                        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* defaultValue) const;
                        BAlignment                      GetAlignment(const 
char* name, int32 index,


Other related posts:

  • » [haiku-commits] BRANCH axeld-github.network-preferences [3c89e7f782bc] headers/os/app - axeld-github . network-preferences