Merge branch 'master' of https://github.com/DigitalPulseSoftware/NazaraEngine
This commit is contained in:
commit
c8d046158c
|
|
@ -158,11 +158,16 @@ namespace Ndk
|
||||||
}
|
}
|
||||||
m_systemBits.Clear();
|
m_systemBits.Clear();
|
||||||
|
|
||||||
UnregisterAllHandles();
|
// We properly destroy each component
|
||||||
|
for (std::size_t i = m_componentBits.FindFirst(); i != m_componentBits.npos; i = m_componentBits.FindNext(i))
|
||||||
|
m_components[i]->SetEntity(nullptr);
|
||||||
|
|
||||||
m_components.clear();
|
m_components.clear();
|
||||||
m_componentBits.Reset();
|
m_componentBits.Reset();
|
||||||
|
|
||||||
|
// And then free every handle
|
||||||
|
UnregisterAllHandles();
|
||||||
|
|
||||||
m_valid = false;
|
m_valid = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5102,10 +5102,14 @@ namespace Nz
|
||||||
*/
|
*/
|
||||||
String String::FormatVA(const char* format, va_list args)
|
String String::FormatVA(const char* format, va_list args)
|
||||||
{
|
{
|
||||||
|
// Copy va_list to use it twice
|
||||||
|
va_list args2;
|
||||||
|
va_copy(args2, args);
|
||||||
|
|
||||||
std::size_t length = std::vsnprintf(nullptr, 0, format, args);
|
std::size_t length = std::vsnprintf(nullptr, 0, format, args);
|
||||||
|
|
||||||
auto str = std::make_shared<SharedString>(length);
|
auto str = std::make_shared<SharedString>(length);
|
||||||
std::vsnprintf(str->string.get(), length + 1, format, args);
|
std::vsnprintf(str->string.get(), length + 1, format, args2);
|
||||||
|
|
||||||
return String(std::move(str));
|
return String(std::move(str));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,12 @@
|
||||||
|
|
||||||
namespace Nz
|
namespace Nz
|
||||||
{
|
{
|
||||||
|
/*!
|
||||||
|
* \ingroup network
|
||||||
|
* \class Nz::UdpSocket
|
||||||
|
* \brief Network class that represents a UDP socket, allowing for sending/receiving datagrams.
|
||||||
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Binds a specific IpAddress
|
* \brief Binds a specific IpAddress
|
||||||
* \return State of the socket
|
* \return State of the socket
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue