| 99 | } |
| 100 | |
| 101 | int main(int argc, const char *argv[]) |
| 102 | { |
| 103 | CCmdlineFix CmdlineFix(&argc, &argv); |
| 104 | std::vector<std::shared_ptr<ILogger>> vpLoggers; |
| 105 | std::shared_ptr<ILogger> pStdoutLogger = std::shared_ptr<ILogger>(log_logger_stdout()); |
| 106 | if(pStdoutLogger) |
| 107 | { |
| 108 | vpLoggers.push_back(pStdoutLogger); |
| 109 | } |
| 110 | IOHANDLE LogFile = io_open("map_diff.txt", IOFLAG_WRITE); |
| 111 | if(LogFile) |
| 112 | { |
| 113 | vpLoggers.push_back(std::shared_ptr<ILogger>(log_logger_file(LogFile))); |
| 114 | } |
| 115 | log_set_global_logger(log_logger_collection(std::move(vpLoggers)).release()); |
| 116 | |
| 117 | if(argc != 3) |
| 118 | { |
| 119 | dbg_msg("usage", "%s map1 map2", argv[0]); |
| 120 | return -1; |
| 121 | } |
| 122 | |
| 123 | std::unique_ptr<IStorage> pStorage = CreateLocalStorage(); |
| 124 | if(!pStorage) |
| 125 | { |
| 126 | log_error("map_diff", "Error creating local storage"); |
| 127 | return -1; |
| 128 | } |
| 129 | |
| 130 | return Process(pStorage.get(), &argv[1]) ? 0 : 1; |
| 131 | } |
nothing calls this directly
no test coverage detected