Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replaced strstream with sstream due to deprecation of the former #158

Merged
merged 1 commit into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions framework/Scene.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <string>
#include <strstream>
#include <sstream>
#include <vector>
#include <set>
#include <map>
Expand Down Expand Up @@ -149,7 +149,7 @@ namespace Framework
}

//Convert to integer.
std::istrstream convStream(anisotropy.c_str());
std::istringstream convStream(anisotropy.c_str());
unsigned int ret;
convStream >> ret;
if(convStream.fail())
Expand Down Expand Up @@ -247,7 +247,7 @@ namespace Framework
{
std::string pathname(Framework::FindFileOrThrow(filename));

std::unique_ptr<glimg::ImageSet> pImageSet;
std::auto_ptr<glimg::ImageSet> pImageSet;
std::string ext = GetExtension(pathname);
if(ext == "dds")
{
Expand Down
32 changes: 16 additions & 16 deletions framework/rapidxml_helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#define FRAMEWORK_RAPIDXML_HELPERS_H

#include <string>
#include <strstream>
#include <sstream>
#include "rapidxml.hpp"
#include <glm/glm.hpp>
#include <glm/gtc/quaternion.hpp>
Expand Down Expand Up @@ -55,7 +55,7 @@ namespace rapidxml
template<typename Callable>
int attrib_to_int(const xml_attribute<> &attrib, Callable FailFunc)
{
std::istrstream inData(attrib.value(), attrib.value_size());
std::istringstream inData(attrib.value());
int ret;
inData >> ret;
if(inData.fail())
Expand All @@ -66,7 +66,7 @@ namespace rapidxml

inline int attrib_to_int_opt(const xml_attribute<> &attrib, int optRet)
{
std::istrstream inData(attrib.value(), attrib.value_size());
std::istringstream inData(attrib.value());
int ret;
inData >> ret;
if(inData.fail())
Expand Down Expand Up @@ -98,7 +98,7 @@ namespace rapidxml
template<typename Callable>
float attrib_to_float(const xml_attribute<> &attrib, Callable FailFunc)
{
std::istrstream inData(attrib.value(), attrib.value_size());
std::istringstream inData(attrib.value());
float ret;
inData >> ret;
if(inData.fail())
Expand All @@ -109,7 +109,7 @@ namespace rapidxml

inline float attrib_to_float_opt(const xml_attribute<> &attrib, float optRet)
{
std::istrstream inData(attrib.value(), attrib.value_size());
std::istringstream inData(attrib.value());
float ret;
inData >> ret;
if(inData.fail())
Expand Down Expand Up @@ -140,7 +140,7 @@ namespace rapidxml
template<typename Callable>
glm::vec2 attrib_to_vec2(const xml_attribute<> &attrib, Callable FailFunc)
{
std::istrstream inData(attrib.value(), attrib.value_size());
std::istringstream inData(attrib.value());
inData >> std::skipws;
glm::vec2 ret;
inData >> ret.x >> ret.y;
Expand All @@ -152,7 +152,7 @@ namespace rapidxml

inline glm::vec2 attrib_to_vec2_opt(const xml_attribute<> &attrib, const glm::vec2 &optRet)
{
std::istrstream inData(attrib.value(), attrib.value_size());
std::istringstream inData(attrib.value());
inData >> std::skipws;
glm::vec2 ret;
inData >> ret.x >> ret.y;
Expand All @@ -166,7 +166,7 @@ namespace rapidxml
template<typename Callable>
glm::vec3 attrib_to_vec3(const xml_attribute<> &attrib, Callable FailFunc)
{
std::istrstream inData(attrib.value(), attrib.value_size());
std::istringstream inData(attrib.value());
inData >> std::skipws;
glm::vec3 ret;
inData >> ret.x >> ret.y >> ret.z;
Expand All @@ -178,7 +178,7 @@ namespace rapidxml

inline glm::vec3 attrib_to_vec3_opt(const xml_attribute<> &attrib, const glm::vec3 &optRet)
{
std::istrstream inData(attrib.value(), attrib.value_size());
std::istringstream inData(attrib.value());
inData >> std::skipws;
glm::vec3 ret;
inData >> ret.x >> ret.y >> ret.z;
Expand All @@ -190,7 +190,7 @@ namespace rapidxml

inline bool attrib_is_vec3(const xml_attribute<> &attrib)
{
std::istrstream inData(attrib.value(), attrib.value_size());
std::istringstream inData(attrib.value());
inData >> std::skipws;
glm::vec3 ret;
inData >> ret.x >> ret.y >> ret.z;
Expand All @@ -203,7 +203,7 @@ namespace rapidxml
template<typename Callable>
glm::vec4 attrib_to_vec4(const xml_attribute<> &attrib, Callable FailFunc)
{
std::istrstream inData(attrib.value(), attrib.value_size());
std::istringstream inData(attrib.value());
inData >> std::skipws;
glm::vec4 ret;
inData >> ret.x >> ret.y >> ret.z >> ret.w;
Expand All @@ -215,7 +215,7 @@ namespace rapidxml

inline glm::vec4 attrib_to_vec4_opt(const xml_attribute<> &attrib, const glm::vec4 &optRet)
{
std::istrstream inData(attrib.value(), attrib.value_size());
std::istringstream inData(attrib.value());
inData >> std::skipws;
glm::vec4 ret;
inData >> ret.x >> ret.y >> ret.z >> ret.w;
Expand All @@ -227,7 +227,7 @@ namespace rapidxml

inline bool attrib_is_vec4(const xml_attribute<> &attrib)
{
std::istrstream inData(attrib.value(), attrib.value_size());
std::istringstream inData(attrib.value());
inData >> std::skipws;
glm::vec4 ret;
inData >> ret.x >> ret.y >> ret.z >> ret.w;
Expand Down Expand Up @@ -261,7 +261,7 @@ namespace rapidxml
template<typename Callable>
glm::fquat attrib_to_quat(const xml_attribute<> &attrib, Callable FailFunc)
{
std::istrstream inData(attrib.value(), attrib.value_size());
std::istringstream inData(attrib.value());
inData >> std::skipws;
glm::fquat ret;
inData >> ret.x >> ret.y >> ret.z >> ret.w;
Expand All @@ -273,7 +273,7 @@ namespace rapidxml

inline glm::fquat attrib_to_quat_opt(const xml_attribute<> &attrib, const glm::fquat &optRet)
{
std::istrstream inData(attrib.value(), attrib.value_size());
std::istringstream inData(attrib.value());
inData >> std::skipws;
glm::fquat ret;
inData >> ret.x >> ret.y >> ret.z >> ret.w;
Expand Down Expand Up @@ -304,4 +304,4 @@ namespace rapidxml

}

#endif //FRAMEWORK_RAPIDXML_HELPERS_H
#endif //FRAMEWORK_RAPIDXML_HELPERS_H
Loading