Fixed operator << warnings.
the build was successful
Details
the build was successful
Details
This commit is contained in:
parent
d3d9f0f4e4
commit
2287a4753c
|
@ -16,19 +16,21 @@
|
|||
|
||||
#include "types_easy.hpp"
|
||||
|
||||
using namespace Mastodon;
|
||||
|
||||
Easy::time::operator const system_clock::time_point() const
|
||||
namespace Mastodon
|
||||
{
|
||||
namespace Easy
|
||||
{
|
||||
time::operator const system_clock::time_point() const
|
||||
{
|
||||
return timepoint;
|
||||
}
|
||||
|
||||
Easy::time::operator const string() const
|
||||
time::operator const string() const
|
||||
{
|
||||
return strtime("%FT%T%z", true);
|
||||
}
|
||||
|
||||
const string Easy::time::strtime(const string &format, const bool &local) const
|
||||
const string time::strtime(const string &format, const bool &local) const
|
||||
{
|
||||
constexpr std::uint16_t bufsize = 1024;
|
||||
std::time_t time = system_clock::to_time_t(timepoint);
|
||||
|
@ -48,10 +50,12 @@ const string Easy::time::strtime(const string &format, const bool &local) const
|
|||
return static_cast<const string>(buffer);
|
||||
}
|
||||
|
||||
std::ostream &Mastodon::Easy::operator <<(std::ostream &out,
|
||||
const Easy::time &t)
|
||||
std::ostream &operator <<(std::ostream &out,
|
||||
const time &t)
|
||||
{
|
||||
const string s = t; // Converts using operator const string().
|
||||
out << s;
|
||||
return out;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
|
||||
#include "return_types.hpp"
|
||||
|
||||
using namespace Mastodon;
|
||||
|
||||
namespace Mastodon
|
||||
{
|
||||
return_base::operator bool()
|
||||
{
|
||||
if (error_code == 0)
|
||||
|
@ -40,7 +40,7 @@ return_call::operator const string() const
|
|||
return answer;
|
||||
}
|
||||
|
||||
std::ostream &Mastodon::operator <<(std::ostream &out, const return_call &ret)
|
||||
std::ostream &operator <<(std::ostream &out, const return_call &ret)
|
||||
{
|
||||
out << ret.answer;
|
||||
return out;
|
||||
|
@ -57,3 +57,4 @@ return_call::return_call(const uint8_t ec, const string &em,
|
|||
error_message = em;
|
||||
http_error_code = hec;
|
||||
}
|
||||
}
|
||||
|
|
Reference in New Issue