Update ProjectManager.cpp

This commit is contained in:
OusmBlueNinja 2025-05-12 12:17:45 -05:00
parent cfcfafd5a0
commit 231181ef92

View File

@ -130,8 +130,7 @@ bool FileExplorer::Init()
std::error_code ec; std::error_code ec;
fs::recursive_directory_iterator it(s_root, fs::directory_options::skip_permission_denied, ec); fs::recursive_directory_iterator it(s_root, fs::directory_options::skip_permission_denied, ec);
fs::recursive_directory_iterator end; for (const fs::recursive_directory_iterator end; it != end; it.increment(ec)) {
for (; it != end; it.increment(ec)) {
if (ec) { if (ec) {
Logger::LogWarning("FileExplorer: skipping '%s': %s", Logger::LogWarning("FileExplorer: skipping '%s': %s",
it->path().string().c_str(), it->path().string().c_str(),
@ -179,14 +178,14 @@ void FileExplorer::Show(bool* p_open)
flags |= ImGuiTreeNodeFlags_Selected; flags |= ImGuiTreeNodeFlags_Selected;
// 1) icon // 1) icon
ImGui::Image((ImTextureID)(intptr_t)s_folderIcon, ImVec2(16,16)); ImGui::Image(s_folderIcon, ImVec2(16,16));
ImGui::SameLine(); ImGui::SameLine();
// 2) label // 2) label
const char* label = (node.path == lastTreeRoot) const char* label = (node.path == lastTreeRoot)
? "res://" ? "res://"
: node.path.filename().string().c_str(); : node.path.filename().string().c_str();
bool open = ImGui::TreeNodeEx( const bool open = ImGui::TreeNodeEx(
node.path.string().c_str(), node.path.string().c_str(),
flags, flags,
"%s", "%s",