diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2014-03-15 19:34:59 -0700 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2014-03-16 18:58:48 -0700 |
commit | c812c92d1a1835f0bda783e709481188c8d92225 (patch) | |
tree | b401ede48a088ad1aaed88fe3b997cd26ff7ae08 /src/strings | |
parent | de9ee1b9754af9d954487121947352f32d7ebb7e (diff) | |
download | tmwa-c812c92d1a1835f0bda783e709481188c8d92225.tar.gz tmwa-c812c92d1a1835f0bda783e709481188c8d92225.tar.bz2 tmwa-c812c92d1a1835f0bda783e709481188c8d92225.tar.xz tmwa-c812c92d1a1835f0bda783e709481188c8d92225.zip |
Clean up header organization
Diffstat (limited to 'src/strings')
-rw-r--r-- | src/strings/astring.cpp | 2 | ||||
-rw-r--r-- | src/strings/base.hpp | 2 | ||||
-rw-r--r-- | src/strings/fwd.hpp | 2 | ||||
-rw-r--r-- | src/strings/mstring.cpp | 2 | ||||
-rw-r--r-- | src/strings/rstring.cpp | 2 | ||||
-rw-r--r-- | src/strings/sstring.cpp | 2 | ||||
-rw-r--r-- | src/strings/tstring.cpp | 2 | ||||
-rw-r--r-- | src/strings/vstring.cpp | 2 | ||||
-rw-r--r-- | src/strings/vstring.hpp | 8 | ||||
-rw-r--r-- | src/strings/vstring.tcc | 2 | ||||
-rw-r--r-- | src/strings/xstring.cpp | 2 | ||||
-rw-r--r-- | src/strings/zstring.cpp | 2 |
12 files changed, 29 insertions, 1 deletions
diff --git a/src/strings/astring.cpp b/src/strings/astring.cpp index f7cfa2e..f1e9030 100644 --- a/src/strings/astring.cpp +++ b/src/strings/astring.cpp @@ -25,6 +25,8 @@ #include "xstring.hpp" #include "vstring.hpp" +//#include "../poison.hpp" + namespace strings { static_assert(sizeof(AString) == 256, "AString"); diff --git a/src/strings/base.hpp b/src/strings/base.hpp index c081f70..cd8d46f 100644 --- a/src/strings/base.hpp +++ b/src/strings/base.hpp @@ -22,6 +22,8 @@ # include "fwd.hpp" # include "pair.hpp" +# include <cstddef> + # include <iterator> // It is a common mistake to assume that one string class for everything. diff --git a/src/strings/fwd.hpp b/src/strings/fwd.hpp index f2b4037..4c58e03 100644 --- a/src/strings/fwd.hpp +++ b/src/strings/fwd.hpp @@ -21,6 +21,8 @@ # include "../sanity.hpp" +# include <cstdint> + // It is a common mistake to assume that one string class for everything. // Because C++ and TMWA have a C legacy, there are a few more here // than would probably be necessary in an ideal language. diff --git a/src/strings/mstring.cpp b/src/strings/mstring.cpp index 0d496a5..2a1ca62 100644 --- a/src/strings/mstring.cpp +++ b/src/strings/mstring.cpp @@ -20,6 +20,8 @@ #include "xstring.hpp" +#include "../poison.hpp" + namespace strings { MString::iterator MString::begin() diff --git a/src/strings/rstring.cpp b/src/strings/rstring.cpp index eb9d88a..c0e231e 100644 --- a/src/strings/rstring.cpp +++ b/src/strings/rstring.cpp @@ -25,6 +25,8 @@ #include "xstring.hpp" #include "vstring.hpp" +//#include "../poison.hpp" + namespace strings { static_assert(sizeof(RString) == sizeof(const char *), "RString"); diff --git a/src/strings/sstring.cpp b/src/strings/sstring.cpp index fee98f9..76f0994 100644 --- a/src/strings/sstring.cpp +++ b/src/strings/sstring.cpp @@ -22,6 +22,8 @@ #include "zstring.hpp" #include "xstring.hpp" +#include "../poison.hpp" + namespace strings { SString::SString() diff --git a/src/strings/tstring.cpp b/src/strings/tstring.cpp index 8be7112..5f463ca 100644 --- a/src/strings/tstring.cpp +++ b/src/strings/tstring.cpp @@ -22,6 +22,8 @@ #include "zstring.hpp" #include "xstring.hpp" +#include "../poison.hpp" + namespace strings { TString::TString() diff --git a/src/strings/vstring.cpp b/src/strings/vstring.cpp index 6a0416a..0ef8f3d 100644 --- a/src/strings/vstring.cpp +++ b/src/strings/vstring.cpp @@ -18,6 +18,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. +#include "../poison.hpp" + namespace strings { } // namespace strings diff --git a/src/strings/vstring.hpp b/src/strings/vstring.hpp index 183e782..c467b64 100644 --- a/src/strings/vstring.hpp +++ b/src/strings/vstring.hpp @@ -65,6 +65,14 @@ namespace strings int do_vprint(VString<len>& out, const char *fmt, va_list ap); } // namespace strings +template<class T> +T stringish(VString<sizeof(T) - 1> iv) +{ + T rv; + static_cast<VString<sizeof(T) - 1>&>(rv) = iv; + return rv; +} + # include "vstring.tcc" #endif // TMWA_STRINGS_VSTRING_HPP diff --git a/src/strings/vstring.tcc b/src/strings/vstring.tcc index 69729d4..1aa163d 100644 --- a/src/strings/vstring.tcc +++ b/src/strings/vstring.tcc @@ -19,7 +19,7 @@ #include <cassert> -#include "../common/utils2.hpp" +#include "../compat/cast.hpp" #include "rstring.hpp" #include "astring.hpp" diff --git a/src/strings/xstring.cpp b/src/strings/xstring.cpp index 8a604c7..0808104 100644 --- a/src/strings/xstring.cpp +++ b/src/strings/xstring.cpp @@ -18,6 +18,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. +#include "../poison.hpp" + namespace strings { XString::XString() diff --git a/src/strings/zstring.cpp b/src/strings/zstring.cpp index bfc0c96..e2a763f 100644 --- a/src/strings/zstring.cpp +++ b/src/strings/zstring.cpp @@ -20,6 +20,8 @@ #include "xstring.hpp" +#include "../poison.hpp" + namespace strings { ZString::ZString() |