aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/color.cpp
diff options
context:
space:
mode:
authorGravatar Kurtis Rader <krader@skepticism.us>2016-05-03 16:23:30 -0700
committerGravatar Kurtis Rader <krader@skepticism.us>2016-05-03 17:14:56 -0700
commitfc44cffac50e6096528f2bde456d91a4e40ea7c9 (patch)
tree3c6c928aa0a8568b6e37a0698deb464575ba3fe2 /src/color.cpp
parent5c8763be0e68bbdec3fdd1edb5754f4c421098e1 (diff)
restyle switch blocks to match project style
I missed restyling a few "switch" blocks to make them consistent with the rest of the code base. This fixes that oversight. This should be the final step in restyling the C++ code to have a consistent style. This also includes a few trivial cleanups elsewhere. I also missed restyling the "complete" module when working my way from a to z so this final change includes restyling that module. Total lint errors decreased 36%. Cppcheck errors went from 47 to 24. Oclint P2 errors went from 819 to 778. Oclint P3 errors went from 3252 to 1842. Resolves #2902.
Diffstat (limited to 'src/color.cpp')
-rw-r--r--src/color.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/color.cpp b/src/color.cpp
index 00651805..6b920d15 100644
--- a/src/color.cpp
+++ b/src/color.cpp
@@ -311,20 +311,26 @@ rgb_color_t::rgb_color_t(const std::string &str) : type(), flags() {
wcstring rgb_color_t::description() const {
switch (type) {
- case type_none:
+ case type_none: {
return L"none";
- case type_named:
+ }
+ case type_named: {
return format_string(L"named(%d: %ls)", (int)data.name_idx,
name_for_color_idx(data.name_idx));
- case type_rgb:
+ }
+ case type_rgb: {
return format_string(L"rgb(0x%02x%02x%02x)", data.color.rgb[0], data.color.rgb[1],
data.color.rgb[2]);
- case type_reset:
+ }
+ case type_reset: {
return L"reset";
- case type_normal:
+ }
+ case type_normal: {
return L"normal";
- default:
+ }
+ default: {
abort();
return L"";
+ }
}
}