diff options
author | Ben Burdette <bburdette@gmail.com> | 2020-04-16 09:55:38 -0600 |
---|---|---|
committer | Ben Burdette <bburdette@gmail.com> | 2020-04-16 09:55:38 -0600 |
commit | 96262e744e4eef67d808a532b1704fceb62bca5b (patch) | |
tree | a1b0451ad0ee4b030572801e19036a7464802eb9 /src/libutil | |
parent | 057e5b6b2e8bf7977c1f57d6f80cc17aa40096d9 (diff) |
switch to structs, which don't need public:
Diffstat (limited to 'src/libutil')
-rw-r--r-- | src/libutil/error.hh | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/libutil/error.hh b/src/libutil/error.hh index 5658e6335..417a6ad95 100644 --- a/src/libutil/error.hh +++ b/src/libutil/error.hh @@ -17,9 +17,8 @@ typedef enum { elError } ErrLevel; -class ErrPos +struct ErrPos { -public: int lineNumber; int column; string nixFile; @@ -40,9 +39,8 @@ public: } }; -class NixCode +struct NixCode { -public: ErrPos errPos; std::optional<string> prevLineOfCode; string errLineOfCode; @@ -54,9 +52,8 @@ public: // are always in yellow. template <class T> -class yellowify +struct yellowify { -public: yellowify(T &s) : value(s) {} T &value; }; @@ -104,9 +101,8 @@ inline hintformat hintfmt(const std::string & fs, const Args & ... args) // ------------------------------------------------- // ErrorInfo. -class ErrorInfo +struct ErrorInfo { -public: ErrLevel level; string name; string description; @@ -114,8 +110,6 @@ public: std::optional<NixCode> nixCode; static std::optional<string> programName; - -private: }; // -------------------------------------------------------- |