Skip to content

Commit

Permalink
Better portability
Browse files Browse the repository at this point in the history
  • Loading branch information
lisitsyn committed Jan 4, 2018
1 parent 79b3e76 commit 6f1fd16
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/shogun/base/SGObject.cpp
Expand Up @@ -33,6 +33,7 @@
#include <rxcpp/rx-lite.hpp>

#include <unordered_map>
#include <memory>

namespace shogun
{
Expand Down Expand Up @@ -927,7 +928,7 @@ void CSGObject::ref_value(...)
class ToStringVisitor : public AnyVisitor
{
public:
ToStringVisitor(std::stringstream* stream) : AnyVisitor(), m_stream(stream)
ToStringVisitor(std::stringstream* ss) : AnyVisitor(), m_stream(ss)
{
}

Expand Down Expand Up @@ -1000,7 +1001,7 @@ class ToStringVisitor : public AnyVisitor
std::string CSGObject::to_string() const
{
std::stringstream ss;
auto visitor = std::make_unique<ToStringVisitor>(&ss);
std::unique_ptr<AnyVisitor> visitor(new ToStringVisitor(&ss));
ss << get_name();
ss << "(";
for (auto it = self->map.begin(); it != self->map.end(); ++it)
Expand Down

0 comments on commit 6f1fd16

Please sign in to comment.