Windows build fixes

This commit is contained in:
Jack Andersen 2018-10-14 10:13:39 -10:00
parent afc3e454a0
commit 199f38933d
2 changed files with 15 additions and 15 deletions

View File

@ -18,15 +18,15 @@ std::vector<hecl::SystemString> FileBrowser::PathComponents(hecl::SystemStringVi
if (sPath.empty())
return ret;
auto it = sPath.cbegin();
if (*it == _S('/'))
if (*it == _SYS_STR('/'))
{
ret.push_back(_S("/"));
ret.push_back(_SYS_STR("/"));
++it;
}
hecl::SystemString comp;
for (; it != sPath.cend() ; ++it)
{
if (*it == _S('/'))
if (*it == _SYS_STR('/'))
{
if (comp.empty())
continue;
@ -142,8 +142,8 @@ void FileBrowser::navigateToPath(hecl::SystemStringView path)
for (const hecl::SystemString& d : m_comps)
{
if (needSlash)
dir += _S('/');
if (d.compare(_S("/")))
dir += _SYS_STR('/');
if (d.compare(_SYS_STR("/")))
needSlash = true;
dir += d;
}
@ -191,8 +191,8 @@ void FileBrowser::okActivated(bool viaButton)
for (const hecl::SystemString& d : m_comps)
{
if (needSlash)
path += _S('/');
if (d.compare(_S("/")))
path += _SYS_STR('/');
if (d.compare(_SYS_STR("/")))
needSlash = true;
path += d;
}
@ -207,7 +207,7 @@ void FileBrowser::okActivated(bool viaButton)
return;
}
path += _S('/');
path += _SYS_STR('/');
path += hecl::SystemStringConv(m_fileField.m_view->getText()).sys_str();
int err = hecl::Stat(path.c_str(), &theStat);
@ -338,13 +338,13 @@ void FileBrowser::cancelActivated()
for (const hecl::SystemString& d : m_comps)
{
if (needSlash)
path += _S('/');
if (d.compare(_S("/")))
path += _SYS_STR('/');
if (d.compare(_SYS_STR("/")))
needSlash = true;
path += d;
}
path += _S('/');
path += _SYS_STR('/');
path += hecl::SystemStringConv(m_fileField.m_view->getText()).sys_str();
m_returnFunc(false, path);
@ -362,8 +362,8 @@ void FileBrowser::pathButtonActivated(size_t idx)
for (const hecl::SystemString& d : m_comps)
{
if (needSlash)
dir += _S('/');
if (d.compare(_S("/")))
dir += _SYS_STR('/');
if (d.compare(_SYS_STR("/")))
needSlash = true;
dir += d;
if (++i > idx)

View File

@ -681,7 +681,7 @@ FontCache::Library::~Library()
FontCache::FontCache(const hecl::Runtime::FileStoreManager& fileMgr)
: m_fileMgr(fileMgr),
m_cacheRoot(hecl::SystemString(m_fileMgr.getStoreRoot()) + _S("/fontcache")),
m_cacheRoot(hecl::SystemString(m_fileMgr.getStoreRoot()) + _SYS_STR("/fontcache")),
m_regFace(m_fontLib, DROIDSANS_PERMISSIVE, DROIDSANS_PERMISSIVE_SZ),
m_monoFace(m_fontLib, BMONOFONT, BMONOFONT_SZ),
m_curvesFace(m_fontLib, SPECTERCURVES, SPECTERCURVES_SZ)
@ -710,7 +710,7 @@ FontTag FontCache::prepCustomFont(std::string_view name, FT_Face face,
return tag;
/* Now check filesystem cache */
hecl::SystemString cachePath = m_cacheRoot + _S('/') + hecl::SysFormat(_S("%" PRIx64), tag.hash());
hecl::SystemString cachePath = m_cacheRoot + _SYS_STR('/') + hecl::SysFormat(_SYS_STR("%" PRIx64), tag.hash());
hecl::Sstat st;
if (!hecl::Stat(cachePath.c_str(), &st) && S_ISREG(st.st_mode))
{