Remove Nz::String and Nz::StringStream
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include <map>
|
||||
#include <list>
|
||||
#include <set>
|
||||
#include <string>
|
||||
|
||||
#ifndef NDK_SERVER
|
||||
#include <Nazara/Core/Log.hpp>
|
||||
@@ -35,13 +36,13 @@ namespace Ndk
|
||||
#endif
|
||||
template<typename... Args> World& AddWorld(Args&&... args);
|
||||
|
||||
inline const std::set<Nz::String>& GetOptions() const;
|
||||
inline const std::map<Nz::String, Nz::String>& GetParameters() const;
|
||||
inline const std::set<std::string>& GetOptions() const;
|
||||
inline const std::map<std::string, std::string>& GetParameters() const;
|
||||
|
||||
inline float GetUpdateTime() const;
|
||||
|
||||
inline bool HasOption(const Nz::String& option) const;
|
||||
inline bool HasParameter(const Nz::String& key, Nz::String* value) const;
|
||||
inline bool HasOption(const std::string& option) const;
|
||||
inline bool HasParameter(const std::string& key, std::string* value) const;
|
||||
|
||||
#ifndef NDK_SERVER
|
||||
inline bool IsConsoleEnabled() const;
|
||||
@@ -73,8 +74,8 @@ namespace Ndk
|
||||
std::vector<WindowInfo> m_windows;
|
||||
#endif
|
||||
|
||||
std::map<Nz::String, Nz::String> m_parameters;
|
||||
std::set<Nz::String> m_options;
|
||||
std::map<std::string, std::string> m_parameters;
|
||||
std::set<std::string> m_options;
|
||||
std::list<World> m_worlds;
|
||||
Nz::Clock m_updateClock;
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ namespace Ndk
|
||||
*
|
||||
* \return Command-line options
|
||||
*/
|
||||
inline const std::set<Nz::String>& Application::GetOptions() const
|
||||
inline const std::set<std::string>& Application::GetOptions() const
|
||||
{
|
||||
return m_options;
|
||||
}
|
||||
@@ -93,7 +93,7 @@ namespace Ndk
|
||||
*
|
||||
* \return Command-line parameters
|
||||
*/
|
||||
inline const std::map<Nz::String, Nz::String>& Application::GetParameters() const
|
||||
inline const std::map<std::string, std::string>& Application::GetParameters() const
|
||||
{
|
||||
return m_parameters;
|
||||
}
|
||||
@@ -118,7 +118,7 @@ namespace Ndk
|
||||
*
|
||||
* \see GetOptions
|
||||
*/
|
||||
inline bool Application::HasOption(const Nz::String& option) const
|
||||
inline bool Application::HasOption(const std::string& option) const
|
||||
{
|
||||
return m_options.count(option) != 0;
|
||||
}
|
||||
@@ -135,7 +135,7 @@ namespace Ndk
|
||||
*
|
||||
* \see GetParameters
|
||||
*/
|
||||
inline bool Application::HasParameter(const Nz::String& key, Nz::String* value) const
|
||||
inline bool Application::HasParameter(const std::string& key, std::string* value) const
|
||||
{
|
||||
auto it = m_parameters.find(key);
|
||||
if (it == m_parameters.end())
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace Ndk
|
||||
inline void SetLinearVelocity(const Nz::Vector3f& velocity);
|
||||
inline void SetMass(float mass);
|
||||
inline void SetMassCenter(const Nz::Vector3f& center);
|
||||
inline void SetMaterial(const Nz::String& materialName);
|
||||
inline void SetMaterial(const std::string& materialName);
|
||||
inline void SetMaterial(int materialIndex);
|
||||
inline void SetPosition(const Nz::Vector3f& position);
|
||||
inline void SetRotation(const Nz::Quaternionf& rotation);
|
||||
|
||||
@@ -410,7 +410,7 @@ namespace Ndk
|
||||
*
|
||||
* \remark materialName must exists in PhysWorld before this call
|
||||
*/
|
||||
inline void PhysicsComponent3D::SetMaterial(const Nz::String& materialName)
|
||||
inline void PhysicsComponent3D::SetMaterial(const std::string& materialName)
|
||||
{
|
||||
NazaraAssert(m_object, "Invalid physics object");
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include <NazaraSDK/Algorithm.hpp>
|
||||
#include <NazaraSDK/Prerequisites.hpp>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace Ndk
|
||||
@@ -72,7 +73,7 @@ namespace Ndk
|
||||
inline void RemoveComponent(ComponentIndex index);
|
||||
template<typename ComponentType> void RemoveComponent();
|
||||
|
||||
inline Nz::String ToString() const;
|
||||
inline std::string ToString() const;
|
||||
|
||||
Entity& operator=(const Entity&) = delete;
|
||||
Entity& operator=(Entity&&) = delete;
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
|
||||
#include <NazaraSDK/Entity.hpp>
|
||||
#include <Nazara/Core/Error.hpp>
|
||||
#include <Nazara/Core/StringStream.hpp>
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <sstream>
|
||||
#include <type_traits>
|
||||
|
||||
namespace Ndk
|
||||
@@ -245,10 +245,12 @@ namespace Ndk
|
||||
* \return A string representation of the object: "Entity(GetId())"
|
||||
*/
|
||||
|
||||
inline Nz::String Entity::ToString() const
|
||||
inline std::string Entity::ToString() const
|
||||
{
|
||||
Nz::StringStream ss;
|
||||
return ss << "Entity(" << GetId() << ')';
|
||||
std::ostringstream ss;
|
||||
ss << "Entity(" << GetId() << ')';
|
||||
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
// For conditions of distribution and use, see copyright notice in Prerequisites.hpp
|
||||
|
||||
#include <NazaraSDK/EntityOwner.hpp>
|
||||
#include <Nazara/Core/StringStream.hpp>
|
||||
#include <functional>
|
||||
#include <limits>
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include <NazaraSDK/StateMachine.hpp>
|
||||
#include <Nazara/Core/Error.hpp>
|
||||
#include <algorithm>
|
||||
#include <utility>
|
||||
|
||||
namespace Ndk
|
||||
|
||||
Reference in New Issue
Block a user