From abd20776a24dfcfefa0019e860e8cd3f600d042e Mon Sep 17 00:00:00 2001 From: Dennis Luxen Date: Wed, 7 May 2014 15:37:39 +0200 Subject: [PATCH] reformat file in Include --- Include/osrm/Coordinate.h | 3 ++- Include/osrm/Header.h | 24 +++++++++++++----------- Include/osrm/Reply.h | 35 ++++++++++++++++++----------------- Include/osrm/ServerPaths.h | 4 ++-- 4 files changed, 35 insertions(+), 31 deletions(-) diff --git a/Include/osrm/Coordinate.h b/Include/osrm/Coordinate.h index 2be323486..18d37366b 100644 --- a/Include/osrm/Coordinate.h +++ b/Include/osrm/Coordinate.h @@ -53,7 +53,8 @@ struct FixedPointCoordinate static double ApproximateEuclideanDistance(const FixedPointCoordinate &c1, const FixedPointCoordinate &c2); - static double ApproximateEuclideanDistance(const int lat1, const int lon1, const int lat2, const int lon2); + static double + ApproximateEuclideanDistance(const int lat1, const int lon1, const int lat2, const int lon2); static void convertInternalLatLonToString(const int value, std::string &output); diff --git a/Include/osrm/Header.h b/Include/osrm/Header.h index 29c300061..1b74e3b86 100644 --- a/Include/osrm/Header.h +++ b/Include/osrm/Header.h @@ -30,16 +30,18 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include -namespace http { - - struct Header { - std::string name; - std::string value; - void Clear() { - name.clear(); - value.clear(); - } - }; +namespace http +{ +struct Header +{ + std::string name; + std::string value; + void Clear() + { + name.clear(); + value.clear(); + } +}; } -#endif //HTTP_HEADER_H +#endif // HTTP_HEADER_H diff --git a/Include/osrm/Reply.h b/Include/osrm/Reply.h index df199a2d3..436d651b7 100644 --- a/Include/osrm/Reply.h +++ b/Include/osrm/Reply.h @@ -34,25 +34,26 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include -namespace http { +namespace http +{ -const char okHTML[] = ""; -const char badRequestHTML[] = "{\"status\": 400,\"status_message\":\"Bad Request\"}"; -const char internalServerErrorHTML[] = "{\"status\": 500,\"status_message\":\"Internal Server Error\"}"; -const char seperators[] = { ':', ' ' }; -const char crlf[] = { '\r', '\n' }; +const char okHTML[] = ""; +const char badRequestHTML[] = "{\"status\": 400,\"status_message\":\"Bad Request\"}"; +const char internalServerErrorHTML[] = + "{\"status\": 500,\"status_message\":\"Internal Server Error\"}"; +const char seperators[] = {':', ' '}; +const char crlf[] = {'\r', '\n'}; const std::string okString = "HTTP/1.0 200 OK\r\n"; const std::string badRequestString = "HTTP/1.0 400 Bad Request\r\n"; const std::string internalServerErrorString = "HTTP/1.0 500 Internal Server Error\r\n"; -class Reply { -public: - enum status_type { - ok = 200, - badRequest = 400, - internalServerError = 500 - } status; - +class Reply +{ + public: + enum status_type + { ok = 200, + badRequest = 400, + internalServerError = 500 } status; std::vector
headers; std::vector toBuffers(); @@ -63,11 +64,11 @@ public: void SetUncompressedSize(); Reply(); -private: + + private: std::string ToString(Reply::status_type status); boost::asio::const_buffer ToBuffer(Reply::status_type status); }; - } -#endif //REPLY_H +#endif // REPLY_H diff --git a/Include/osrm/ServerPaths.h b/Include/osrm/ServerPaths.h index d804f49e9..b7d326e75 100644 --- a/Include/osrm/ServerPaths.h +++ b/Include/osrm/ServerPaths.h @@ -28,11 +28,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef SERVER_PATH_H #define SERVER_PATH_H -#include #include +#include #include typedef boost::unordered_map ServerPaths; -#endif //SERVER_PATH_H +#endif // SERVER_PATH_H