Util: Rename FormatAngleBracket -> FormatOperatorStyle

This commit is contained in:
Riyyi
2022-07-28 01:19:09 +02:00
parent 3837ebef06
commit 187e082018
2 changed files with 11 additions and 11 deletions
+4 -4
View File
@@ -47,21 +47,21 @@ void variadicFormat(std::stringstream& stream, std::string_view format, TypeEras
// ----------------------------------------- // -----------------------------------------
FormatAngleBracket::FormatAngleBracket(std::string& output) FormatOperatorStyle::FormatOperatorStyle(std::string& output)
: m_output(output) : m_output(output)
, m_stream() , m_stream()
, m_builder(m_stream) , m_builder(m_stream)
{ {
} }
FormatAngleBracket::~FormatAngleBracket() FormatOperatorStyle::~FormatOperatorStyle()
{ {
m_output = m_stream.str(); m_output = m_stream.str();
} }
FormatAngleBracket formatTo(std::string& output) FormatOperatorStyle formatTo(std::string& output)
{ {
return FormatAngleBracket(output); return FormatOperatorStyle(output);
} }
} // namespace Util::Format } // namespace Util::Format
+7 -7
View File
@@ -84,10 +84,10 @@ void formatTo(std::string& output, std::string_view format, const Parameters&...
// ----------------------------------------- // -----------------------------------------
class FormatAngleBracket { class FormatOperatorStyle {
public: public:
FormatAngleBracket(std::string& output); FormatOperatorStyle(std::string& output);
virtual ~FormatAngleBracket(); virtual ~FormatOperatorStyle();
Builder& builder() { return m_builder; } Builder& builder() { return m_builder; }
@@ -98,13 +98,13 @@ private:
}; };
template<typename T> template<typename T>
const FormatAngleBracket& operator<<(const FormatAngleBracket& formatAngleBracket, const T& value) const FormatOperatorStyle& operator<<(const FormatOperatorStyle& formatOperatorStyle, const T& value)
{ {
_format(const_cast<FormatAngleBracket&>(formatAngleBracket).builder(), value); _format(const_cast<FormatOperatorStyle&>(formatOperatorStyle).builder(), value);
return formatAngleBracket; return formatOperatorStyle;
} }
FormatAngleBracket formatTo(std::string& output); FormatOperatorStyle formatTo(std::string& output);
} // namespace Util::Format } // namespace Util::Format