File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -244,18 +244,18 @@ geode::Result<> GDPSMain::switchServer(int id) {
244244 return geode::Ok ();
245245}
246246
247- GDPSTypes::ServerSerializeInvalidity GDPSMain::isValidServer (const GDPSTypes::Server& server) const {
247+ GDPSTypes::ServerInvalidity GDPSMain::isValidServer (const GDPSTypes::Server& server) const {
248248 using namespace GDPSTypes ;
249- auto validity = ServerSerializeInvalidity ::Valid;
249+ ServerInvalidity validity = ServerInvalidity ::Valid;
250250 // Regex is scary!
251251 static std::basic_regex urlRegex = std::regex (" (http|https):\\ /\\ /([\\ w_-]+(?:(?:\\ .[\\ w_-]+)+))([\\ w.,@?^=%&:\\ /~+#-]*[\\ w@?^=%&\\ /~+#-])" );
252252
253253 if (server.name .empty ())
254- validity |= ServerSerializeInvalidity ::NameEmpty;
254+ validity |= ServerInvalidity ::NameEmpty;
255255 if (server.url .empty ())
256- validity |= ServerSerializeInvalidity ::UrlEmpty;
256+ validity |= ServerInvalidity ::UrlEmpty;
257257 else if (!std::regex_match (server.url , urlRegex))
258- validity |= ServerSerializeInvalidity ::UrlInvalid;
258+ validity |= ServerInvalidity ::UrlInvalid;
259259
260260 return validity;
261261}
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ class GDPSMain {
2828 geode::Result<> deleteServer (GDPSTypes::Server& server);
2929 geode::Result<> deleteServer (int id);
3030 geode::Result<> switchServer (int id);
31- bool isValidServer (const GDPSTypes::Server& server); // Will check if server info can be saved to disk.
31+ GDPSTypes::ServerInvalidity isValidServer (const GDPSTypes::Server& server) const ; // Will check if server info can be saved to disk.
3232 bool serverExists (int id) const ;
3333 bool shouldSaveGameData () const ;
3434 static bool isBase (std::string url);
You can’t perform that action at this time.
0 commit comments