move Reply into compile unit
This commit is contained in:
@@ -30,6 +30,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include "../DataStructures/Coordinate.h"
|
||||
#include "../Server/BasicDatastructures.h"
|
||||
#include "../Server/Reply.h"
|
||||
#include "../Server/DataStructures/RouteParameters.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
@@ -49,11 +49,11 @@ public:
|
||||
) {
|
||||
//check number of parameters
|
||||
if(!routeParameters.coordinates.size()) {
|
||||
reply = http::Reply::stockReply(http::Reply::badRequest);
|
||||
reply = http::Reply::StockReply(http::Reply::badRequest);
|
||||
return;
|
||||
}
|
||||
if(false == checkCoord(routeParameters.coordinates[0])) {
|
||||
reply = http::Reply::stockReply(http::Reply::badRequest);
|
||||
reply = http::Reply::StockReply(http::Reply::badRequest);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -51,11 +51,11 @@ public:
|
||||
void HandleRequest(const RouteParameters & routeParameters, http::Reply& reply) {
|
||||
//check number of parameters
|
||||
if(!routeParameters.coordinates.size()) {
|
||||
reply = http::Reply::stockReply(http::Reply::badRequest);
|
||||
reply = http::Reply::StockReply(http::Reply::badRequest);
|
||||
return;
|
||||
}
|
||||
if( !checkCoord(routeParameters.coordinates[0]) ) {
|
||||
reply = http::Reply::stockReply(http::Reply::badRequest);
|
||||
reply = http::Reply::StockReply(http::Reply::badRequest);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ public:
|
||||
) {
|
||||
//check number of parameters
|
||||
if( 2 > routeParameters.coordinates.size() ) {
|
||||
reply = http::Reply::stockReply(http::Reply::badRequest);
|
||||
reply = http::Reply::StockReply(http::Reply::badRequest);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ public:
|
||||
std::vector<std::string> textCoord;
|
||||
for(unsigned i = 0; i < routeParameters.coordinates.size(); ++i) {
|
||||
if( !checkCoord(routeParameters.coordinates[i]) ) {
|
||||
reply = http::Reply::stockReply(http::Reply::badRequest);
|
||||
reply = http::Reply::StockReply(http::Reply::badRequest);
|
||||
return;
|
||||
}
|
||||
rawRoute.rawViaNodeCoordinates.push_back(routeParameters.coordinates[i]);
|
||||
|
||||
Reference in New Issue
Block a user