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