Skip to content

Commit

Permalink
Remove setters from structures server_config
Browse files Browse the repository at this point in the history
  • Loading branch information
frodrigo committed Jan 5, 2015
1 parent 84b000a commit 17bfa39
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 51 deletions.
17 changes: 10 additions & 7 deletions Include/osrm/ServerConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,16 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

struct ServerConfig
{
ServerConfig();

void setServerPaths(const ServerPaths paths);

void setUseSharedMemory(const bool use_shared_memory);

void setMaxLocationsDistanceTable(const int max_locations_distance_table);
ServerConfig()
: use_shared_memory(false)
, max_locations_distance_table(100)
{}

ServerConfig(const ServerPaths paths, const bool flag, const int max)
: server_paths(paths)
, use_shared_memory(flag)
, max_locations_distance_table(max)
{}

ServerPaths server_paths;
bool use_shared_memory;
Expand Down
1 change: 0 additions & 1 deletion Library/OSRM_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ struct RouteParameters;

#include <osrm/ServerConfig.h>

#include "../data_structures/server_config.hpp"
#include "../data_structures/query_edge.hpp"

#include <memory>
Expand Down
39 changes: 0 additions & 39 deletions data_structures/server_config.hpp

This file was deleted.

5 changes: 1 addition & 4 deletions routed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,7 @@ int main(int argc, const char *argv[])
pthread_sigmask(SIG_BLOCK, &new_mask, &old_mask);
#endif

ServerConfig server_config;
server_config.setServerPaths(server_paths);
server_config.setUseSharedMemory(use_shared_memory);
server_config.setMaxLocationsDistanceTable(max_locations_distance_table);
ServerConfig server_config(server_paths, use_shared_memory, max_locations_distance_table);
OSRM osrm_lib(server_config);
auto routing_server =
Server::CreateServer(ip_address, ip_port, requested_thread_num);
Expand Down

0 comments on commit 17bfa39

Please sign in to comment.