Fixes to CIA building

1. Optimizes ticket finding
2. Fixes progress reporting overshoot
3. Use u64 for size in general
4. Various other fixes and cleanups
This commit is contained in:
Pengfei
2021-08-06 00:55:35 +08:00
parent fd1c2363eb
commit d4e1404788
23 changed files with 266 additions and 196 deletions
+6 -1
View File
@@ -97,7 +97,7 @@ static std::unordered_map<std::string, Certificate> g_certs;
static bool g_is_loaded = false;
bool Load(const std::string& path) {
g_certs.clear();
Clear();
FileUtil::IOFile file(path, "rb");
DataContainer container(file.GetData());
@@ -151,6 +151,11 @@ bool IsLoaded() {
return g_is_loaded;
}
void Clear() {
g_is_loaded = false;
g_certs.clear();
}
const Certificate& Get(const std::string& name) {
return g_certs.at(name);
}