Stylish style fixes for ColorSet

This commit is contained in:
John Scipione
2013-04-08 23:11:39 -04:00
parent 968cf7c83d
commit 3e30da293d
2 changed files with 17 additions and 9 deletions
+9 -4
View File
@@ -8,6 +8,7 @@
* Rene Gollent <[email protected]> * Rene Gollent <[email protected]>
*/ */
#include <stdio.h> #include <stdio.h>
#include <Catalog.h> #include <Catalog.h>
#include <DefaultColors.h> #include <DefaultColors.h>
@@ -21,9 +22,11 @@
#include <String.h> #include <String.h>
#include "ColorSet.h" #include "ColorSet.h"
#undef B_TRANSLATION_CONTEXT #undef B_TRANSLATION_CONTEXT
#define B_TRANSLATION_CONTEXT "Colors tab" #define B_TRANSLATION_CONTEXT "Colors tab"
static ColorDescription sColorDescriptionTable[] = static ColorDescription sColorDescriptionTable[] =
{ {
{ B_PANEL_BACKGROUND_COLOR, B_TRANSLATE_MARK("Panel background") }, { B_PANEL_BACKGROUND_COLOR, B_TRANSLATE_MARK("Panel background") },
@@ -80,6 +83,7 @@ get_color_description(int32 index)
return &sColorDescriptionTable[index]; return &sColorDescriptionTable[index];
} }
int32 int32
color_description_count(void) color_description_count(void)
{ {
@@ -93,6 +97,7 @@ ColorSet::ColorSet()
{ {
} }
/*! /*!
\brief Copy constructor which does a massive number of assignments \brief Copy constructor which does a massive number of assignments
\param cs Color set to copy from \param cs Color set to copy from
@@ -102,12 +107,14 @@ ColorSet::ColorSet(const ColorSet &cs)
*this = cs; *this = cs;
} }
/*! /*!
\brief Overloaded assignment operator which does a massive number of assignments \brief Overloaded assignment operator which does a massive number of
assignments.
\param cs Color set to copy from \param cs Color set to copy from
\return The new values assigned to the color set \return The new values assigned to the color set
*/ */
ColorSet & ColorSet&
ColorSet::operator=(const ColorSet &cs) ColorSet::operator=(const ColorSet &cs)
{ {
fColors = cs.fColors; fColors = cs.fColors;
@@ -150,5 +157,3 @@ ColorSet::GetColor(int32 which)
{ {
return fColors[(color_which)which]; return fColors[(color_which)which];
} }
+3
View File
@@ -17,12 +17,14 @@
#include <map> #include <map>
typedef struct typedef struct
{ {
color_which which; color_which which;
const char* text; const char* text;
} ColorDescription; } ColorDescription;
const ColorDescription* get_color_description(int32 index); const ColorDescription* get_color_description(int32 index);
int32 color_description_count(void); int32 color_description_count(void);
@@ -56,4 +58,5 @@ class ColorSet : public BLocker {
std::map<color_which, rgb_color> fColors; std::map<color_which, rgb_color> fColors;
}; };
#endif // COLOR_SET_H #endif // COLOR_SET_H