Styleguide refactoring

This commit is contained in:
DennisOSRM 2013-09-20 21:07:57 +02:00 committed by Dennis Luxen
parent 642473244e
commit 45dee5a666

View File

@ -132,7 +132,10 @@ static inline void doubleToString(const double value, std::string & output){
boost::spirit::karma::generate(sink, boost::spirit::karma::double_, value);
}
static inline void doubleToStringWithTwoDigitsBehindComma(const double value, std::string & output){
static inline void doubleToStringWithTwoDigitsBehindComma(
const double value,
std::string & output
){
// The largest 32-bit integer is 4294967295, that is 10 chars
// On the safe side, add 1 for sign, and 1 for trailing zero
char buffer[12] ;
@ -140,11 +143,19 @@ static inline void doubleToStringWithTwoDigitsBehindComma(const double value, st
output = buffer ;
}
inline void replaceAll(std::string &s, const std::string &sub, const std::string &other) {
inline void replaceAll(
std::string & s,
const std::string & sub,
const std::string & other
) {
boost::replace_all(s, sub, other);
}
inline void stringSplit(const std::string &s, const char delim, std::vector<std::string>& result) {
inline void stringSplit(
const std::string &s,
const char delim,
std::vector<std::string>& result
) {
boost::split(result, s, boost::is_any_of(std::string(&delim)));
}
@ -166,7 +177,10 @@ inline std::string HTMLDeEntitize( std::string & result) {
return result;
}
inline bool StringStartsWith(const std::string & input, const std::string & prefix) {
inline bool StringStartsWith(
const std::string & input,
const std::string & prefix
) {
return boost::starts_with(input, prefix);
}