[haiku-commits] haiku: hrev43812 - in src/kits: tracker interface

  • From: anevilyak@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 3 Mar 2012 02:41:45 +0100 (CET)

hrev43812 adds 1 changeset to branch 'master'
old head: 7c89d968b5eeab98a9f4246d451954eda17081b0
new head: 418367589556790e6fb2b2a9cadf62b1408a87c9

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

4183675: Move black/white color constant definitions to header.
  
  Previously, there were two instances of the actual variables, named in
  ControlLook.cpp and Utilities.cpp. This caused clashes on gcc4 builds, leading
  to various crashes during initialization. Instead we now declare them as
  static constants in the header itself as is done for various other interface
  color constants elsewhere. Fixes ticket #8358.

                                      [ Rene Gollent <anevilyak@xxxxxxxxx> ]

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

Revision:    hrev43812
Commit:      418367589556790e6fb2b2a9cadf62b1408a87c9
URL:         http://cgit.haiku-os.org/haiku/commit/?id=4183675
Author:      Rene Gollent <anevilyak@xxxxxxxxx>
Date:        Sat Mar  3 01:39:12 2012 UTC

Ticket:      https://dev.haiku-os.org/ticket/8358

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

3 files changed, 2 insertions(+), 7 deletions(-)
src/kits/interface/ControlLook.cpp |    2 --
src/kits/tracker/Utilities.cpp     |    3 ---
src/kits/tracker/Utilities.h       |    4 ++--

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

diff --git a/src/kits/interface/ControlLook.cpp 
b/src/kits/interface/ControlLook.cpp
index fa1d1f3..8a123fc 100644
--- a/src/kits/interface/ControlLook.cpp
+++ b/src/kits/interface/ControlLook.cpp
@@ -22,8 +22,6 @@ namespace BPrivate {
 
 static const float kEdgeBevelLightTint = 0.59;
 static const float kEdgeBevelShadowTint = 1.0735;
-const rgb_color kWhite = (rgb_color){255, 255, 255, 255};
-const rgb_color kBlack = (rgb_color){0, 0, 0, 255};
 
 
 BControlLook::BControlLook():
diff --git a/src/kits/tracker/Utilities.cpp b/src/kits/tracker/Utilities.cpp
index 527fd54..4d37dc9 100644
--- a/src/kits/tracker/Utilities.cpp
+++ b/src/kits/tracker/Utilities.cpp
@@ -81,9 +81,6 @@ namespace BPrivate {
 
 const float kExactMatchScore = INFINITY;
 
-const rgb_color        kBlack = {0, 0, 0, 255};
-const rgb_color        kWhite = {255, 255, 255, 255};
-
 
 bool gLocalizedNamePreferred;
 
diff --git a/src/kits/tracker/Utilities.h b/src/kits/tracker/Utilities.h
index c420e6e..1a6a2db 100644
--- a/src/kits/tracker/Utilities.h
+++ b/src/kits/tracker/Utilities.h
@@ -72,8 +72,8 @@ class BPose;
 class BPoseView;
 
 // global variables
-extern const rgb_color kBlack;
-extern const rgb_color kWhite;
+static const rgb_color kBlack = {0, 0, 0, 255};
+static const rgb_color kWhite = {255, 255, 255 ,255};
 
 const int64 kHalfKBSize = 512;
 const int64 kKBSize = 1024;


Other related posts: