diff --git a/src/iomanip.hpp b/src/iomanip.hpp index 5096c66..47293de 100644 --- a/src/iomanip.hpp +++ b/src/iomanip.hpp @@ -41,41 +41,38 @@ namespace sc { std::ostream& whiteb(std::ostream& out); std::ostream& defaultb(std::ostream& out); - class grayf { + struct grayf { int _val; - public: - grayf(int val); - friend std::ostream& operator<<(std::ostream& out, const grayf& obj); + grayf(int val); }; - class grayb { + struct grayb { int _val; - public: - grayb(int val); - friend std::ostream& operator<<(std::ostream& out, const grayb& obj); + grayb(int val); }; - class rgbf { + struct rgbf { int _r; int _g; int _b; - public: - rgbf(int r, int g, int b); - friend std::ostream& operator<<(std::ostream& out, const rgbf& obj); + rgbf(int r, int g, int b); }; - class rgbb { + struct rgbb { int _r; int _g; int _b; - public: - rgbb(int r, int g, int b); - friend std::ostream& operator<<(std::ostream& out, const rgbb& obj); + rgbb(int r, int g, int b); }; + + std::ostream& operator<<(std::ostream& out, const grayf& obj); + std::ostream& operator<<(std::ostream& out, const grayb& obj); + std::ostream& operator<<(std::ostream& out, const rgbf& obj); + std::ostream& operator<<(std::ostream& out, const rgbb& obj); } } diff --git a/src/utils.hpp b/src/utils.hpp index ee58410..e9afd39 100644 --- a/src/utils.hpp +++ b/src/utils.hpp @@ -36,14 +36,13 @@ namespace sc { namespace io { - class clear_line { + struct clear_line { const term& _term; - public: - clear_line(const term& t); - friend std::ostream& operator<<(std::ostream& out, const clear_line& obj); + clear_line(const term& t); }; + std::ostream& operator<<(std::ostream& out, const clear_line& obj); } }