Refactored emitter operator << overloads to not template them, so it's easier to overload for pointer types

This commit is contained in:
Jesse Beder
2009-11-17 20:21:22 +00:00
parent 3307f0941c
commit 03df73a7b0
3 changed files with 115 additions and 58 deletions

View File

@@ -549,14 +549,6 @@ namespace YAML
return *this;
}
Emitter& Emitter::Write(const char *str)
{
if(!good())
return *this;
return Write(std::string(str));
}
void Emitter::PreWriteIntegralType(std::stringstream& str)
{
PreAtomicWrite();
@@ -623,38 +615,6 @@ namespace YAML
return *this;
}
Emitter& Emitter::Write(float f)
{
if(!good())
return *this;
PreAtomicWrite();
EmitSeparationIfNecessary();
std::stringstream str;
str << f;
m_stream << str.str();
PostAtomicWrite();
return *this;
}
Emitter& Emitter::Write(double d)
{
if(!good())
return *this;
PreAtomicWrite();
EmitSeparationIfNecessary();
std::stringstream str;
str << d;
m_stream << str.str();
PostAtomicWrite();
return *this;
}
Emitter& Emitter::Write(const _Alias& alias)
{
if(!good())