[core] code style cleanups

- puts function definitions in a namespace ... {} rather than using namespace ...;
- remove trailing whitespace
- add trailing newline
- protect SQL statements from being formatted by clang-format
This commit is contained in:
Konstantin Käfer
2016-07-01 11:51:54 +02:00
parent da863c6e52
commit 77e7846756
51 changed files with 268 additions and 155 deletions

View File

@@ -30,7 +30,7 @@
#include <cmath>
#include <algorithm>
using namespace CSSColorParser;
namespace CSSColorParser {
// http://www.w3.org/TR/css3-color/
struct NamedColor { const char *const name; const Color color; };
@@ -180,7 +180,7 @@ std::vector<std::string> split(const std::string& s, char delim) {
return elems;
}
Color CSSColorParser::parse(const std::string& css_str) {
Color parse(const std::string& css_str) {
std::string str = css_str;
// Remove all whitespace, not compliant, but should just be more accepting.
@@ -288,3 +288,5 @@ Color CSSColorParser::parse(const std::string& css_str) {
return {};
}
} // namespace CSSColorParser