Skip to content

Commit

Permalink
Core : Cleaning code and Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
diegomrno committed Apr 26, 2024
1 parent 38e9e43 commit af04976
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 392 deletions.
26 changes: 2 additions & 24 deletions main/include/vortex.h
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,6 @@ struct hString
char* Data;
size_t Size;
size_t Capacity;

};
//=============================================================================

Expand All @@ -448,6 +447,7 @@ class hArgs {
~hArgs() {for (const auto& pair : arguments) {delete pair.value;}}

hVector<hString> registered_arguments;

private:
class ArgumentBase {public: virtual ~ArgumentBase() = default;};

Expand All @@ -456,7 +456,7 @@ class hArgs {
public:
ArgumentHolder(T value) : storedValue(value) {}
T getValue() const { return storedValue;}
private:
private:
T storedValue;
};

Expand Down Expand Up @@ -489,10 +489,7 @@ struct VxScript{
std::string author = "unknow"; // Proper name of the script
std::string description = "unknow"; // Short description of the script
std::string configFilePath = "unknow"; // Short description of the script


std::string path = "unknow"; // Path to script

void Refresh();
void PushSave(std::shared_ptr<VxScriptSave> save);
};
Expand All @@ -505,35 +502,27 @@ struct ToolchainSave{
char description[128] = "unknow";
char type[128] = "unknow";
char state[128] = "unknow";

char host_arch[128] = "unknow";
char host_vendor[128] = "unknow";
char host_platform[128] = "unknow";
char host_cpu[128] = "unknow";
char host_fpu[128] = "unknow";

char builder_arch[128] = "unknow";
char builder_vendor[128] = "unknow";
char builder_platform[128] = "unknow";
char builder_cpu[128] = "unknow";
char builder_fpu[128] = "unknow";

char target_arch[128] = "unknow";
char target_vendor[128] = "unknow";
char target_platform[128] = "unknow";
char target_cpu[128] = "unknow";
char target_fpu[128] = "unknow";

char toolchain_type[128] = "unknow";

char compression[128] = "unknow";
char toolchains_compilation[128] = "unknow";


char localPackagePath[128] = "unknow";
char localScriptsPath[128] = "unknow";
char localPatchsPath[128] = "unknow";

std::vector<std::pair<char[128], char[128]>> registeredPackages;
std::vector<std::pair<char[128], char[128]>> registeredTasklists;
};
Expand All @@ -551,20 +540,15 @@ struct HostSave{
char host_arch[128] = "unknow";
char target_arch[128] = "unknow";
char toolchainToUse[128] = "unknow";


char localPackagePath[128] = "unknow";
char localScriptsPath[128] = "unknow";
char localPatchsPath[128] = "unknow";

std::vector<std::pair<char[128], char[128]>> registeredPackages;

};


struct VxActionReport{
std::string actionType;

std::string label;
std::string result;
std::string state;
Expand All @@ -574,7 +558,6 @@ struct VxActionReport{
struct VxHostSnapshot{
std::string date;
std::string name;

// VxHostCurrentSystem snapshotSystem; // to import from
};
struct VxDistHost{
Expand Down Expand Up @@ -624,16 +607,13 @@ struct VxDistToolchain{
std::string path;
std::string vendor;
std::string platform;


std::string CC;
std::string CXX;
std::string AR;
std::string AS;
std::string RANLIB;
std::string LD;
std::string STRIP;

};


Expand All @@ -655,7 +635,6 @@ class TaskFactory {
}

hMap<std::string, CreatorFunction> creatorMap;

};


Expand All @@ -674,7 +653,6 @@ class TaskFactory {
class Module {
public:
virtual void test();

};


Expand Down
3 changes: 2 additions & 1 deletion tools/editor/app/core/ContentBrowser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,9 @@
if (ImGui::IsItemHovered() && ImGui::IsMouseDoubleClicked(ImGuiMouseButton_Left))
{
if (directoryEntry.is_directory())
{
m_CurrentDirectory /= path.filename();

}
}
ImGui::TextWrapped(filenameString.c_str());

Expand Down
14 changes: 14 additions & 0 deletions tools/editor/app/core/ModuleManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ void ModuleManager::OnImGuiRender()

if (ImGui::ImageButtonWithText(trashIcon, "Delete", ImVec2(this->m_RefreshIcon->GetWidth(), this->m_RefreshIcon->GetHeight())))
{
// Behavior
}
}
if (ctx->IO.em[i]->m_state == "unknow" || ctx->IO.em[i]->m_state == "stopped")
Expand All @@ -323,6 +324,7 @@ void ModuleManager::OnImGuiRender()

if (ImGui::ImageButtonWithText(trashIcon, "Delete", ImVec2(this->m_RefreshIcon->GetWidth(), this->m_RefreshIcon->GetHeight())))
{
// Behavior
}
}

Expand Down Expand Up @@ -375,20 +377,24 @@ void ModuleManager::menubar()
}
if (ImGui::ImageButtonWithText(refreshIcon, "Refresh", ImVec2(this->m_RefreshIcon->GetWidth(), this->m_RefreshIcon->GetHeight())))
{
// Behavior
}

ImGui::Separator();
if (ImGui::ImageButtonWithText(addIcon, "Browse public modules", ImVec2(this->m_AddIcon->GetWidth(), this->m_AddIcon->GetHeight())))
{
// Behavior
}
ImGui::Separator();
if (ImGui::BeginMenu("Filters"))
{
if (ImGui::MenuItem("Build/Rebuild single parts"))
{
// Behavior
}
if (ImGui::MenuItem("Global build"))
{
// Behavior
}
ImGui::EndMenu();
}
Expand Down Expand Up @@ -509,6 +515,7 @@ void ModuleManager::menubar()

if (ImGui::ImageButtonWithText(addIcon, "Add to the current project", ImVec2(this->m_RefreshIcon->GetWidth(), this->m_RefreshIcon->GetHeight())))
{
// Behavior
}
ImGui::EndChild();
}
Expand All @@ -532,35 +539,42 @@ void ModuleManager::menubar()

if (ImGui::ImageButtonWithText(refreshIcon, "Refresh", ImVec2(this->m_RefreshIcon->GetWidth(), this->m_RefreshIcon->GetHeight())))
{
// Behavior
}
ImGui::Separator();
if (ImGui::BeginMenu("Filters"))
{
if (ImGui::MenuItem("Build/Rebuild single parts"))
{
// Behavior
}
if (ImGui::MenuItem("Global build"))
{
// Behavior
}
ImGui::EndMenu();
}
if (ImGui::BeginMenu("Create a module"))
{
if (ImGui::MenuItem("Build/Rebuild single parts"))
{
// Behavior
}
if (ImGui::MenuItem("Global build"))
{
// Behavior
}
ImGui::EndMenu();
}
if (ImGui::BeginMenu("Search"))
{
if (ImGui::MenuItem("Build/Rebuild single parts"))
{
// Behavior
}
if (ImGui::MenuItem("Global build"))
{
// Behavior
}
ImGui::EndMenu();
}
Expand Down
Loading

0 comments on commit af04976

Please sign in to comment.