Rename B_COLOR_WHICH_COUNT to kColorWhichCount
This commit is contained in:
@@ -17,21 +17,21 @@
|
||||
// B_SUCCESS_COLOR and B_FAILURE_COLOR.
|
||||
// If you add a constant with index greater than 100 you'll have to add
|
||||
// to the second operand.
|
||||
static const int32 B_COLOR_WHICH_COUNT = B_SCROLL_BAR_THUMB_COLOR + 3;
|
||||
static const int32 kColorWhichCount = B_SCROLL_BAR_THUMB_COLOR + 3;
|
||||
|
||||
|
||||
struct server_read_only_memory {
|
||||
rgb_color colors[B_COLOR_WHICH_COUNT];
|
||||
rgb_color colors[kColorWhichCount];
|
||||
};
|
||||
|
||||
|
||||
static inline int32
|
||||
color_which_to_index(color_which which)
|
||||
{
|
||||
if (which <= B_COLOR_WHICH_COUNT - 3)
|
||||
if (which <= kColorWhichCount - 3)
|
||||
return which - 1;
|
||||
if (which >= B_SUCCESS_COLOR && which <= B_FAILURE_COLOR)
|
||||
return which - B_SUCCESS_COLOR + B_COLOR_WHICH_COUNT - 3;
|
||||
return which - B_SUCCESS_COLOR + kColorWhichCount - 3;
|
||||
|
||||
return -1;
|
||||
}
|
||||
@@ -40,12 +40,12 @@ color_which_to_index(color_which which)
|
||||
static inline color_which
|
||||
index_to_color_which(int32 index)
|
||||
{
|
||||
if (index >= 0 && index < B_COLOR_WHICH_COUNT) {
|
||||
if ((color_which)index < B_COLOR_WHICH_COUNT - 3)
|
||||
if (index >= 0 && index < kColorWhichCount) {
|
||||
if ((color_which)index < kColorWhichCount - 3)
|
||||
return (color_which)(index + 1);
|
||||
else {
|
||||
return (color_which)(index + B_SUCCESS_COLOR
|
||||
- B_COLOR_WHICH_COUNT - 3);
|
||||
- kColorWhichCount - 3);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user