Remove useless import,add exception catch

This commit is contained in:
yangzhi 2019-10-10 09:40:43 +08:00
parent c2c6dec531
commit cc5b550cef
1 changed files with 7 additions and 4 deletions

View File

@ -1,6 +1,5 @@
#include "main.h"
#include "cwmods/cwmods.h"
#include "cwmods/common/LongVector3.h"
#include <wchar.h>
#include <stdio.h>
#include <string.h>
@ -59,8 +58,12 @@ void InitHomeMap(){
std::string x = elements.at(1);
std::string y = elements.at(2);
std::string z = elements.at(3);
std::vector<long long> coords {std::stoll(x), std::stoll(y), std::stoll(z)};
home_map[name] = coords;
try {
std::vector<long long> coords {std::stoll(x), std::stoll(y), std::stoll(z)};
home_map[name] = coords;
} catch ( ... ) {
continue;
}
}
}
}