Merge branch 'master' into physics3d-material
This commit is contained in:
@@ -31,7 +31,7 @@ namespace Nz
|
||||
namespace
|
||||
{
|
||||
//FIXME: MinGW seems to dislike thread_local shared_ptr.. (using a std::string is a working hackfix)
|
||||
thread_local std::string currentPath(DirectoryImpl::GetCurrent());
|
||||
thread_local std::string currentPath(DirectoryImpl::GetCurrent().ToStdString());
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -526,7 +526,7 @@ namespace Nz
|
||||
String path = File::AbsolutePath(dirPath);
|
||||
if (DirectoryImpl::Exists(path))
|
||||
{
|
||||
currentPath = path;
|
||||
currentPath = path.ToStdString();
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -148,7 +148,7 @@ namespace Nz
|
||||
|
||||
if (type == ErrorType_AssertFailed || (type != ErrorType_Warning &&
|
||||
(s_flags & ErrorFlag_ThrowException) != 0 && (s_flags & ErrorFlag_ThrowExceptionDisabled) == 0))
|
||||
throw std::runtime_error(error);
|
||||
throw std::runtime_error(error.ToStdString());
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -183,7 +183,7 @@ namespace Nz
|
||||
|
||||
if (type == ErrorType_AssertFailed || (type != ErrorType_Warning &&
|
||||
(s_flags & ErrorFlag_ThrowException) != 0 && (s_flags & ErrorFlag_ThrowExceptionDisabled) == 0))
|
||||
throw std::runtime_error(error);
|
||||
throw std::runtime_error(error.ToStdString());
|
||||
}
|
||||
|
||||
UInt32 Error::s_flags = ErrorFlag_None;
|
||||
|
||||
@@ -4197,13 +4197,21 @@ namespace Nz
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Converts the string to std::string
|
||||
* \return std::string representation
|
||||
*/
|
||||
std::string String::ToStdString() const
|
||||
{
|
||||
return std::string(m_sharedString->string.get(), m_sharedString->size);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Converts the string to upper
|
||||
* \return Upper string
|
||||
*
|
||||
* \param flags Flag for the look up
|
||||
*/
|
||||
|
||||
String String::ToUpper(UInt32 flags) const
|
||||
{
|
||||
if (m_sharedString->size == 0)
|
||||
@@ -4481,16 +4489,6 @@ namespace Nz
|
||||
}
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \brief Converts the string to std::string
|
||||
* \return std::string representation
|
||||
*/
|
||||
|
||||
String::operator std::string() const
|
||||
{
|
||||
return std::string(m_sharedString->string.get(), m_sharedString->size);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Gets the ith character in the string
|
||||
* \return A reference to the character
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace Nz
|
||||
{
|
||||
String lastError(lua_tostring(internalState, -1));
|
||||
|
||||
throw std::runtime_error("Lua panic: " + lastError);
|
||||
throw std::runtime_error("Lua panic: " + lastError.ToStdString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ namespace Nz
|
||||
if (varPtr->type != type)
|
||||
{
|
||||
//TODO: AstParseError
|
||||
throw std::runtime_error("Function uses parameter \"" + name + "\" with a different type than specified in the function arguments");
|
||||
throw std::runtime_error("Function uses parameter \"" + name.ToStdString() + "\" with a different type than specified in the function arguments");
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -98,7 +98,7 @@ namespace Nz
|
||||
|
||||
if (!found)
|
||||
//TODO: AstParseError
|
||||
throw std::runtime_error("Function has no parameter \"" + name + "\"");
|
||||
throw std::runtime_error("Function has no parameter \"" + name.ToStdString() + "\"");
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user