mirror of
https://github.com/asdlokj1qpi233/subconverter.git
synced 2026-11-03 10:12:50 +00:00
Optimize codes
Force fileGet to use binary mode to prevent some problem. Make cache system serve the existing cache when download failed. Replace some if-statements with switch-statements. Clean up codes.
This commit is contained in:
8 files changed
+223
-180
No files matched your search
+1
-1
@@ -61,7 +61,7 @@ void shortDisassemble(int source, unsigned short &num_a, unsigned short &num_b);
|
||||
std::string UTF8ToCodePoint(const std::string &data);
|
||||
std::string GetEnv(const std::string &name);
|
||||
|
||||
std::string fileGet(const std::string &path, bool binary, bool scope_limit = false);
|
||||
std::string fileGet(const std::string &path, bool scope_limit = false);
|
||||
int fileWrite(const std::string &path, const std::string &content, bool overwrite);
|
||||
bool fileExist(const std::string &path);
|
||||
bool fileCopy(const std::string &source, const std::string &dest);
|
||||
|
||||
Reference in new issue
Block a user