Update ProjectManager.cpp
This commit is contained in:
parent
cfcfafd5a0
commit
231181ef92
@ -130,8 +130,7 @@ bool FileExplorer::Init()
|
||||
|
||||
std::error_code ec;
|
||||
fs::recursive_directory_iterator it(s_root, fs::directory_options::skip_permission_denied, ec);
|
||||
fs::recursive_directory_iterator end;
|
||||
for (; it != end; it.increment(ec)) {
|
||||
for (const fs::recursive_directory_iterator end; it != end; it.increment(ec)) {
|
||||
if (ec) {
|
||||
Logger::LogWarning("FileExplorer: skipping '%s': %s",
|
||||
it->path().string().c_str(),
|
||||
@ -179,14 +178,14 @@ void FileExplorer::Show(bool* p_open)
|
||||
flags |= ImGuiTreeNodeFlags_Selected;
|
||||
|
||||
// 1) icon
|
||||
ImGui::Image((ImTextureID)(intptr_t)s_folderIcon, ImVec2(16,16));
|
||||
ImGui::Image(s_folderIcon, ImVec2(16,16));
|
||||
ImGui::SameLine();
|
||||
|
||||
// 2) label
|
||||
const char* label = (node.path == lastTreeRoot)
|
||||
? "res://"
|
||||
: node.path.filename().string().c_str();
|
||||
bool open = ImGui::TreeNodeEx(
|
||||
const bool open = ImGui::TreeNodeEx(
|
||||
node.path.string().c_str(),
|
||||
flags,
|
||||
"%s",
|
||||
|
Loading…
Reference in New Issue
Block a user