fix compile errors with GCC/Clang
This commit is contained in:
parent
ece696c3b5
commit
920a1fe490
@ -106,6 +106,12 @@
|
||||
#if defined(__GLIBCPP__) || defined(__GLIBCXX__)
|
||||
//<codecvt> is a known issue on libstdc++, it works on libc++
|
||||
#define STD_CODECVT_NOT_SUPPORTED
|
||||
|
||||
|
||||
#ifndef STD_MAKE_UNIQUE_NOT_SUPPORTED
|
||||
#define STD_MAKE_UNIQUE_NOT_SUPPORTED
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#elif defined(__GNUC__) //GCC
|
||||
|
||||
@ -364,6 +364,8 @@ namespace filesystem
|
||||
|
||||
}//end namespace filesystem
|
||||
} //end namespace experimental
|
||||
|
||||
namespace filesystem = experimental::filesystem;
|
||||
}//end namespace nana
|
||||
|
||||
#endif
|
||||
|
||||
@ -142,7 +142,7 @@ namespace nana
|
||||
auto path = path_.caption();
|
||||
auto root = path.substr(0, path.find('/'));
|
||||
if(root == "HOME")
|
||||
path.replace(0, 4, to_nstring(nana::filesystem::path_user()));
|
||||
path.replace(0, 4, nana::filesystem::path_user().native());
|
||||
else if(root == "FILESYSTEM")
|
||||
path.erase(0, 10);
|
||||
else
|
||||
@ -344,7 +344,7 @@ namespace nana
|
||||
else
|
||||
dir = saved_selected_path;
|
||||
|
||||
_m_load_cat_path(dir.size() ? dir : to_nstring(nana::filesystem::path_user()));
|
||||
_m_load_cat_path(dir.size() ? dir : nana::filesystem::path_user().native());
|
||||
|
||||
tb_file_.caption(file_with_path_removed);
|
||||
}
|
||||
@ -430,7 +430,7 @@ namespace nana
|
||||
namespace fs = ::nana::experimental::filesystem;
|
||||
|
||||
std::vector<std::string> paths;
|
||||
paths.emplace_back(nana::filesystem::path_user());
|
||||
paths.emplace_back(fs::path_user().native());
|
||||
paths.emplace_back("/");
|
||||
|
||||
fs::directory_iterator end;
|
||||
@ -474,7 +474,7 @@ namespace nana
|
||||
{
|
||||
auto begstr = path.substr(0, pos);
|
||||
if(begstr == "FS.HOME")
|
||||
path.replace(0, 7, to_nstring(nana::filesystem::path_user()));
|
||||
path.replace(0, 7, nana::filesystem::path_user().native());
|
||||
else
|
||||
path.erase(0, pos);
|
||||
return begstr;
|
||||
@ -534,7 +534,7 @@ namespace nana
|
||||
while(!beg_node.empty() && (beg_node != nodes_.home) && (beg_node != nodes_.filesystem))
|
||||
beg_node = beg_node.owner();
|
||||
|
||||
auto head = to_nstring(nana::filesystem::path_user());
|
||||
auto head = nana::filesystem::path_user().native();
|
||||
if(path.size() >= head.size() && (path.substr(0, head.size()) == head))
|
||||
{//This is HOME
|
||||
path_.caption("HOME");
|
||||
|
||||
@ -263,7 +263,7 @@ namespace checkbox
|
||||
if (ui_container_.end() == i)
|
||||
return;
|
||||
|
||||
checkbox * target;
|
||||
checkbox * target = nullptr;
|
||||
|
||||
if (keyboard::os_arrow_up == arg.key)
|
||||
{
|
||||
@ -280,8 +280,11 @@ namespace checkbox
|
||||
target = ui_container_.front().uiobj;
|
||||
}
|
||||
|
||||
target->check(true);
|
||||
target->focus();
|
||||
if(target)
|
||||
{
|
||||
target->check(true);
|
||||
target->focus();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
@ -237,7 +237,7 @@ namespace paint
|
||||
#if defined(NANA_WINDOWS)
|
||||
ptr = std::make_shared<detail::image_ico>(true);
|
||||
#else
|
||||
return false;
|
||||
return ptr;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
@ -247,7 +247,7 @@ namespace paint
|
||||
#if defined(NANA_ENABLE_PNG)
|
||||
ptr = std::make_shared<detail::image_png>;
|
||||
#else
|
||||
return false;
|
||||
return ptr;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
@ -257,7 +257,7 @@ namespace paint
|
||||
#if defined(NANA_ENABLE_JPEG)
|
||||
ptr = std::make_shared<detail::image_jpeg>();
|
||||
#else
|
||||
return false;
|
||||
return ptr;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user