clang tidy cleanups

This commit is contained in:
scawful
2024-08-21 00:37:14 -04:00
parent e0e8c58c61
commit ea8a851539
13 changed files with 57 additions and 36 deletions

View File

@@ -228,7 +228,6 @@ void ApplyBpsPatch(const std::vector<uint8_t> &source,
}
size_t patch_offset = 4;
uint64_t source_size = decode(patch, patch_offset);
uint64_t target_size = decode(patch, patch_offset);
uint64_t metadata_size = decode(patch, patch_offset);
patch_offset += metadata_size;

View File

@@ -108,6 +108,46 @@ class ExperimentFlags {
}
return flags_.get();
}
std::string Serialize() const {
std::string result;
result +=
"kLogInstructions: " + std::to_string(flags_->kLogInstructions) + "\n";
result +=
"kUseNewImGuiInput: " + std::to_string(flags_->kUseNewImGuiInput) +
"\n";
result +=
"kSaveAllPalettes: " + std::to_string(flags_->kSaveAllPalettes) + "\n";
result +=
"kSaveGfxGroups: " + std::to_string(flags_->kSaveGfxGroups) + "\n";
result += "kSaveWithChangeQueue: " +
std::to_string(flags_->kSaveWithChangeQueue) + "\n";
result += "kDrawDungeonRoomGraphics: " +
std::to_string(flags_->kDrawDungeonRoomGraphics) + "\n";
result += "kNewFileDialogWrapper: " +
std::to_string(flags_->kNewFileDialogWrapper) + "\n";
result +=
"kLoadSystemFonts: " + std::to_string(flags_->kLoadSystemFonts) + "\n";
result += "kLoadTexturesAsStreaming: " +
std::to_string(flags_->kLoadTexturesAsStreaming) + "\n";
result +=
"kSaveDungeonMaps: " + std::to_string(flags_->kSaveDungeonMaps) + "\n";
result += "kLogToConsole: " + std::to_string(flags_->kLogToConsole) + "\n";
result +=
"kLoadAudioDevice: " + std::to_string(flags_->kLoadAudioDevice) + "\n";
result += "kDrawOverworldSprites: " +
std::to_string(flags_->overworld.kDrawOverworldSprites) + "\n";
result += "kSaveOverworldMaps: " +
std::to_string(flags_->overworld.kSaveOverworldMaps) + "\n";
result += "kSaveOverworldEntrances: " +
std::to_string(flags_->overworld.kSaveOverworldEntrances) + "\n";
result += "kSaveOverworldExits: " +
std::to_string(flags_->overworld.kSaveOverworldExits) + "\n";
result += "kSaveOverworldItems: " +
std::to_string(flags_->overworld.kSaveOverworldItems) + "\n";
result += "kSaveOverworldProperties: " +
std::to_string(flags_->overworld.kSaveOverworldProperties) + "\n";
return result;
}
private:
static std::shared_ptr<Flags> flags_;

View File

@@ -446,7 +446,6 @@ absl::Status Controller::CreateGuiContext() {
absl::Status Controller::LoadFontFamilies() const {
ImGuiIO &io = ImGui::GetIO();
const char *assets_path = "assets/font/";
static const char *KARLA_REGULAR = "Karla-Regular.ttf";
static const char *ROBOTO_MEDIUM = "Roboto-Medium.ttf";
static const char *COUSINE_REGULAR = "Cousine-Regular.ttf";

View File

@@ -101,14 +101,9 @@ struct Project : public core::ExperimentFlags {
return absl::OkStatus();
}
absl::Status SerializeExperimentFlags() {
auto flags = mutable_flags();
// TODO: Serialize flags
return absl::OkStatus();
}
bool project_opened_ = false;
std::string name;
std::string flags = "";
std::string filepath;
std::string rom_filename_ = "";
std::string code_folder_ = "";