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:
Tindy X committed 2020-02-22 20:32:49 +08:00
1 parent e3726192dd
commit 3efd22a1f3
8 files changed
+223 -180

No files matched your search

+1 -1
View File
@@ -299,7 +299,7 @@ public:
{
if(!fileExist(filePath))
__SAVE_ERROR_AND_RETURN(INIREADER_EXCEPTION_NOTEXIST);
return Parse(fileGet(filePath, false));
return Parse(fileGet(filePath));
}
/**