Switch from Nz prefix to namespace Nz

What a huge commit


Former-commit-id: 38ac5eebf70adc1180f571f6006192d28fb99897
This commit is contained in:
Lynix
2015-09-25 19:20:05 +02:00
parent c214251ecf
commit df8da275c4
609 changed files with 68265 additions and 66534 deletions

View File

@@ -4,37 +4,39 @@
#include <Nazara/Core/Debug.hpp>
inline NzString::NzString(std::shared_ptr<SharedString>&& sharedString) :
m_sharedString(std::move(sharedString))
namespace Nz
{
}
inline String::String(std::shared_ptr<SharedString>&& sharedString) :
m_sharedString(std::move(sharedString))
{
}
inline void NzString::ReleaseString()
{
m_sharedString = std::move(GetEmptyString());
}
inline void String::ReleaseString()
{
m_sharedString = std::move(GetEmptyString());
}
inline NzString::SharedString::SharedString() : // Special case: empty string
capacity(0),
size(0)
{
}
inline String::SharedString::SharedString() : // Special case: empty string
capacity(0),
size(0)
{
}
inline NzString::SharedString::SharedString(unsigned int strSize) :
capacity(strSize),
size(strSize),
string(new char[strSize + 1])
{
string[strSize] = '\0';
inline String::SharedString::SharedString(unsigned int strSize) :
capacity(strSize),
size(strSize),
string(new char[strSize + 1])
{
string[strSize] = '\0';
}
}
namespace std
{
template<>
struct hash<NzString>
struct hash<Nz::String>
{
size_t operator()(const NzString& str) const
size_t operator()(const Nz::String& str) const
{
// Algorithme DJB2
// http://www.cse.yorku.ca/~oz/hash.html