summaryrefslogtreecommitdiff
path: root/src/generic/dumb_ptr.hpp
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2014-06-27 19:16:45 -0700
committerBen Longbons <b.r.longbons@gmail.com>2014-06-27 19:33:42 -0700
commit7af4c5b5c561362cb1135ab504095ae667a9270a (patch)
tree49ffd3008d7634ba36f3951493a68e928407ce89 /src/generic/dumb_ptr.hpp
parent8d7f1dadeeb1dc1609b72de5a4ee3a5247b0e9e6 (diff)
downloadtmwa-7af4c5b5c561362cb1135ab504095ae667a9270a.tar.gz
tmwa-7af4c5b5c561362cb1135ab504095ae667a9270a.tar.bz2
tmwa-7af4c5b5c561362cb1135ab504095ae667a9270a.tar.xz
tmwa-7af4c5b5c561362cb1135ab504095ae667a9270a.zip
This is more reliable
Diffstat (limited to 'src/generic/dumb_ptr.hpp')
-rw-r--r--src/generic/dumb_ptr.hpp23
1 files changed, 10 insertions, 13 deletions
diff --git a/src/generic/dumb_ptr.hpp b/src/generic/dumb_ptr.hpp
index 4d4473f..a9d6893 100644
--- a/src/generic/dumb_ptr.hpp
+++ b/src/generic/dumb_ptr.hpp
@@ -1,5 +1,4 @@
-#ifndef TMWA_GENERIC_DUMB_PTR_HPP
-#define TMWA_GENERIC_DUMB_PTR_HPP
+#pragma once
// dumb_ptr.hpp - temporary new/delete wrappers
//
// Copyright © 2013 Ben Longbons <b.r.longbons@gmail.com>
@@ -19,16 +18,16 @@
// 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 "fwd.hpp"
+#include "fwd.hpp"
-# include <cstring>
+#include <cstring>
-# include <algorithm>
-# include <utility>
+#include <algorithm>
+#include <utility>
-# include "../strings/astring.hpp"
-# include "../strings/zstring.hpp"
-# include "../strings/xstring.hpp"
+#include "../strings/astring.hpp"
+#include "../strings/zstring.hpp"
+#include "../strings/xstring.hpp"
namespace tmwa
@@ -208,9 +207,9 @@ struct dumb_string
return dumb_string::copy(&*s.begin(), &*s.end());
}
static
-# ifndef __clang__
+#ifndef __clang__
__attribute__((warning("shouldn't use this - slice instead")))
-# endif
+#endif
dumb_string copyn(const char *sn, size_t n)
{
return dumb_string::copy(sn, sn + strnlen(sn, n));
@@ -271,5 +270,3 @@ const char *convert_for_printf(dumb_string ds)
return ds.c_str();
}
} // namespace tmwa
-
-#endif // TMWA_GENERIC_DUMB_PTR_HPP