refactor: Get rid of this->m_

This commit is contained in:
WerWolv
2023-12-19 13:10:25 +01:00
parent dd4be3b772
commit c7ab4a4569
119 changed files with 2973 additions and 2973 deletions

View File

@@ -20,16 +20,16 @@ namespace hex::script::loader {
virtual bool loadAll() = 0;
void addScript(std::string name, std::function<void()> entryPoint) {
this->m_scripts.emplace_back(std::move(name), std::move(entryPoint));
m_scripts.emplace_back(std::move(name), std::move(entryPoint));
}
const auto& getScripts() const {
return this->m_scripts;
return m_scripts;
}
protected:
void clearScripts() {
this->m_scripts.clear();
m_scripts.clear();
}
private:

View File

@@ -166,7 +166,7 @@ namespace hex::script::loader {
component_entry_point_fn entryPoint = nullptr;
u32 result = loadAssembly(
this->m_assemblyLoaderPathString.c_str(),
m_assemblyLoaderPathString.c_str(),
dotnetType,
dotnetTypeMethod,
nullptr,
@@ -179,7 +179,7 @@ namespace hex::script::loader {
continue;
}
this->m_loadAssembly = [entryPoint](const std::fs::path &path) -> bool {
m_loadAssembly = [entryPoint](const std::fs::path &path) -> bool {
auto string = wolv::util::toUTF8String(path);
auto result = entryPoint(string.data(), string.size());
@@ -212,7 +212,7 @@ namespace hex::script::loader {
continue;
this->addScript(entry.path().stem().string(), [this, scriptPath] {
hex::unused(this->m_loadAssembly(scriptPath));
hex::unused(m_loadAssembly(scriptPath));
});
}
}

View File

@@ -22,7 +22,7 @@ public:
m_message(std::move(message)) { }
void drawContent() override {
ImGuiExt::TextFormattedWrapped("{}", this->m_message.c_str());
ImGuiExt::TextFormattedWrapped("{}", m_message.c_str());
ImGui::NewLine();
ImGui::Separator();
@@ -65,23 +65,23 @@ public:
m_message(std::move(message)), m_maxSize(maxSize) { }
void drawContent() override {
ImGuiExt::TextFormattedWrapped("{}", this->m_message.c_str());
ImGuiExt::TextFormattedWrapped("{}", m_message.c_str());
ImGui::NewLine();
ImGui::SetItemDefaultFocus();
ImGui::SetNextItemWidth(-1);
bool submitted = ImGui::InputText("##input", this->m_input, ImGuiInputTextFlags_EnterReturnsTrue);
if (this->m_input.size() > this->m_maxSize)
this->m_input.resize(this->m_maxSize);
bool submitted = ImGui::InputText("##input", m_input, ImGuiInputTextFlags_EnterReturnsTrue);
if (m_input.size() > m_maxSize)
m_input.resize(m_maxSize);
ImGui::NewLine();
ImGui::Separator();
auto width = ImGui::GetWindowWidth();
ImGui::SetCursorPosX(width / 9);
ImGui::BeginDisabled(this->m_input.empty());
ImGui::BeginDisabled(m_input.empty());
if (ImGui::Button("hex.builtin.common.okay"_lang, ImVec2(width / 3, 0)) || submitted) {
s_inputTextBoxResult = this->m_input;
s_inputTextBoxResult = m_input;
this->close();
}
ImGui::EndDisabled();