diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2014-06-27 19:16:45 -0700 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2014-06-27 19:33:42 -0700 |
commit | 7af4c5b5c561362cb1135ab504095ae667a9270a (patch) | |
tree | 49ffd3008d7634ba36f3951493a68e928407ce89 /src/ints/little.hpp | |
parent | 8d7f1dadeeb1dc1609b72de5a4ee3a5247b0e9e6 (diff) | |
download | tmwa-7af4c5b5c561362cb1135ab504095ae667a9270a.tar.gz tmwa-7af4c5b5c561362cb1135ab504095ae667a9270a.tar.bz2 tmwa-7af4c5b5c561362cb1135ab504095ae667a9270a.tar.xz tmwa-7af4c5b5c561362cb1135ab504095ae667a9270a.zip |
This is more reliable
Diffstat (limited to 'src/ints/little.hpp')
-rw-r--r-- | src/ints/little.hpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/ints/little.hpp b/src/ints/little.hpp index 62bd729..0dbbb61 100644 --- a/src/ints/little.hpp +++ b/src/ints/little.hpp @@ -1,5 +1,4 @@ -#ifndef TMWA_INTS_LITTLE_HPP -#define TMWA_INTS_LITTLE_HPP +#pragma once // little.hpp - integers of known endianness // // Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com> @@ -19,20 +18,20 @@ // 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 <endian.h> +#include <endian.h> -# include <cstdint> +#include <cstdint> namespace tmwa { // We implement our own actual swapping, because glibc emits assembly // instead of letting the *compiler* do what it does best. -# if __BYTE_ORDER != __BIG_ENDIAN && __BYTE_ORDER != __LITTLE_ENDIAN -# error "broken endians" -# endif +#if __BYTE_ORDER != __BIG_ENDIAN && __BYTE_ORDER != __LITTLE_ENDIAN +# error "broken endians" +#endif namespace ints { @@ -139,5 +138,3 @@ using ints::Little16; using ints::Little32; using ints::Little64; } // namespace tmwa - -#endif // TMWA_INTS_LITTLE_HPP |