Convert to pragma once

This commit is contained in:
Jack Andersen 2018-10-06 17:37:09 -10:00
parent 5f2611702d
commit 0cdfd0ad9f
54 changed files with 54 additions and 162 deletions

View File

@ -1,5 +1,4 @@
#ifndef LZBASE_HPP #pragma once
#define LZBASE_HPP
#include <string> #include <string>
#include "LZ77/LZLookupTable.hpp" #include "LZ77/LZLookupTable.hpp"
@ -41,4 +40,3 @@ protected:
}; };
#endif // LZBASE_HPP

View File

@ -1,5 +1,4 @@
#ifndef LZLOOKUPTABLE_HPP #pragma once
#define LZLOOKUPTABLE_HPP
#include <map> #include <map>
#include <deque> #include <deque>
@ -36,4 +35,3 @@ private:
}; };
#endif // LZLOOKUPTABLE_HPP

View File

@ -1,5 +1,4 @@
#ifndef LZ77TYPE10_HPP #pragma once
#define LZ77TYPE10_HPP
#include "LZBase.hpp" #include "LZBase.hpp"
@ -11,4 +10,3 @@ public:
atUint32 decompress(const atUint8* src, atUint8** dst, atUint32 srcLen); atUint32 decompress(const atUint8* src, atUint8** dst, atUint32 srcLen);
}; };
#endif // LZ77TYPE10_HPP

View File

@ -1,5 +1,4 @@
#ifndef LZTYPE11_HPP #pragma once
#define LZTYPE11_HPP
#include "LZBase.hpp" #include "LZBase.hpp"
@ -13,4 +12,3 @@ public:
}; };
#endif // LZTYPE11_HPP

View File

@ -1,5 +1,4 @@
#ifndef __AES_HPP__ #pragma once
#define __AES_HPP__
#include <cstdint> #include <cstdint>
#include <cstdlib> #include <cstdlib>
@ -21,4 +20,3 @@ std::unique_ptr<IAES> NewAES();
} }
#endif //__AES_HPP__

View File

@ -1,5 +1,4 @@
#ifndef ALTTP_ENUMS_HPP #pragma once
#define ALTTP_ENUMS_HPP
#include "Types.hpp" #include "Types.hpp"
@ -92,4 +91,3 @@ enum ALTTPTagAlong
}; };
} // zelda } // zelda
#endif // ALTTP_ENUMS_HPP

View File

@ -1,5 +1,4 @@
#ifndef ALTTP_FILE_HPP #pragma once
#define ALTTP_FILE_HPP
#include "athena/Global.hpp" #include "athena/Global.hpp"
#include <vector> #include <vector>
@ -73,4 +72,3 @@ private:
}; };
} // zelda } // zelda
#endif // ALTTP_FILE_HPP

View File

@ -1,5 +1,4 @@
#ifndef ALTTP_FILE_READER_HPP #pragma once
#define ALTTP_FILE_READER_HPP
#include <string> #include <string>
#include "athena/Types.hpp" #include "athena/Types.hpp"
@ -48,4 +47,3 @@ private:
} // io } // io
} // zelda } // zelda
#endif // ALTTP_FILE_READER_HPP

View File

@ -1,5 +1,4 @@
#ifndef ALTTP_FILE_WRITER_HPP #pragma once
#define ALTTP_FILE_WRITER_HPP
#include <string> #include <string>
#include "athena/MemoryWriter.hpp" #include "athena/MemoryWriter.hpp"
@ -50,4 +49,3 @@ private:
} // io } // io
} // zelda } // zelda
#endif // ALTTP_FILE_WRITER_HPP

View File

@ -1,5 +1,4 @@
#ifndef ALTTP_QUEST_HPP #pragma once
#define ALTTP_QUEST_HPP
#include "athena/Global.hpp" #include "athena/Global.hpp"
#include <string> #include <string>
@ -669,4 +668,3 @@ private:
} // zelda } // zelda
#endif // ALTTP_QUEST_HPP

View File

@ -1,5 +1,4 @@
#ifndef ALTTP_STRUCTS_HPP #pragma once
#define ALTTP_STRUCTS_HPP
#include <string> #include <string>
#include "athena/Types.hpp" #include "athena/Types.hpp"
@ -197,4 +196,3 @@ struct ALTTPProgressFlags2
} }
#endif // ALTTP_STRUCTS_HPP

View File

@ -1,5 +1,4 @@
#ifndef CHECKSUMS_HPP #pragma once
#define CHECKSUMS_HPP
#include "athena/Global.hpp" #include "athena/Global.hpp"
@ -10,4 +9,3 @@ atUint32 crc32(const atUint8* data, atUint64 length, atUint32 seed = 0xFFFFFFFF,
atUint16 crc16CCITT(const atUint8* data, atUint64 length, atUint16 seed = 0xFFFF, atUint16 final = 0); atUint16 crc16CCITT(const atUint8* data, atUint64 length, atUint16 seed = 0xFFFF, atUint16 final = 0);
atUint16 crc16(const atUint8* data, atUint64 length, atUint16 seed = 0, atUint16 final = 0); atUint16 crc16(const atUint8* data, atUint64 length, atUint16 seed = 0, atUint16 final = 0);
} }
#endif // CHECKSUMS_HPP

View File

@ -1,5 +1,4 @@
#ifndef AT_CHECKSUMSLITERALS_HPP #pragma once
#define AT_CHECKSUMSLITERALS_HPP
#include <cstdint> #include <cstdint>
@ -196,4 +195,3 @@ static_assert("0"_crc64 == Crc64<'0'>::value,
} }
#endif // AT_CHECKSUMSLITERALS_HPP

View File

@ -1,5 +1,4 @@
#ifndef COMPRESSION_HPP #pragma once
#define COMPRESSION_HPP
#include "athena/Global.hpp" #include "athena/Global.hpp"
@ -19,4 +18,3 @@ atUint32 yaz0Encode(const atUint8* src, atUint32 srcSize, atUint8* data);
atUint32 decompressLZ77(const atUint8* src, atUint32 srcLen, atUint8** dst); atUint32 decompressLZ77(const atUint8* src, atUint32 srcLen, atUint8** dst);
atUint32 compressLZ77(const atUint8* src, atUint32 srcLen, atUint8** dst, bool extended = false); atUint32 compressLZ77(const atUint8* src, atUint32 srcLen, atUint8** dst, bool extended = false);
} }
#endif // COMPRESSION_HPP

View File

@ -1,5 +1,4 @@
#ifndef DNA_HPP #pragma once
#define DNA_HPP
/* BIG FAT WARNING!!! /* BIG FAT WARNING!!!
* *
@ -150,5 +149,4 @@ struct DNAVYaml : DNAV<DNAE>
} }
#endif // DNA_HPP

View File

@ -1,5 +1,4 @@
#ifndef AT_DNAOP_HPP #pragma once
#define AT_DNAOP_HPP
#include "IStreamReader.hpp" #include "IStreamReader.hpp"
#include "IStreamWriter.hpp" #include "IStreamWriter.hpp"
@ -1273,4 +1272,3 @@ void __VA_ARGS__::Enumerate<athena::io::DNA<athena::Big>::WriteYaml>(typename Wr
} \ } \
AT_SUBSPECIALIZE_DNA(__VA_ARGS__) AT_SUBSPECIALIZE_DNA(__VA_ARGS__)
#endif // AT_DNAOP_HPP

View File

@ -1,5 +1,4 @@
#ifndef DNAYAML_HPP #pragma once
#define DNAYAML_HPP
#include "YAMLDocReader.hpp" #include "YAMLDocReader.hpp"
#include "YAMLDocWriter.hpp" #include "YAMLDocWriter.hpp"
@ -136,4 +135,3 @@ static inline bool ValidateFromYAMLStream(athena::io::IStreamReader& fin)
} }
#endif // DNAYAML_HPP

View File

@ -1,5 +1,4 @@
#ifndef DIR_HPP #pragma once
#define DIR_HPP
#include "athena/FileInfo.hpp" #include "athena/FileInfo.hpp"
#include <cstdio> #include <cstdio>
@ -36,4 +35,3 @@ private:
}; };
} }
#endif // DIR_HPP

View File

@ -1,5 +1,4 @@
#ifndef FILEINFO_HPP #pragma once
#define FILEINFO_HPP
#include <string> #include <string>
@ -56,4 +55,3 @@ private:
}; };
} }
#endif // FILEINFO_HPP

View File

@ -1,5 +1,4 @@
#ifndef FILESTREAM_HPP #pragma once
#define FILESTREAM_HPP
#if _WIN32 #if _WIN32
#ifndef WIN32_LEAN_AND_MEAN #ifndef WIN32_LEAN_AND_MEAN
@ -82,4 +81,3 @@ private: \
#endif // FILEREADER_BASE #endif // FILEREADER_BASE
#endif // FILESTREAM_HPP

View File

@ -1,5 +1,4 @@
#ifndef FILEWRITER_HPP #pragma once
#define FILEWRITER_HPP
#if _WIN32 #if _WIN32
#ifndef WIN32_LEAN_AND_MEAN #ifndef WIN32_LEAN_AND_MEAN
@ -120,4 +119,3 @@ private: \
typedef athena::io::FileWriter base; typedef athena::io::FileWriter base;
#endif // FILEWRITER_BASE #endif // FILEWRITER_BASE
#endif // FILEWRITER_HPP

View File

@ -1,5 +1,4 @@
#ifndef GLOBAL_HPP #pragma once
#define GLOBAL_HPP
#include <iostream> #include <iostream>
#include "athena/Types.hpp" #include "athena/Types.hpp"
@ -262,4 +261,3 @@ std::ostream& operator<<(std::ostream& os, const athena::Endian& endian);
} while (0) } while (0)
#endif // defined(__GNUC__) #endif // defined(__GNUC__)
#endif // GLOBAL_HPP

View File

@ -1,5 +1,4 @@
#ifndef STREAM_HPP #pragma once
#define STREAM_HPP
#include "Global.hpp" #include "Global.hpp"
@ -32,4 +31,3 @@ protected:
#endif #endif
}; };
} }
#endif // STREAM_HPP

View File

@ -1,5 +1,4 @@
#ifndef ISTREAMREADER_HPP #pragma once
#define ISTREAMREADER_HPP
#include <memory> #include <memory>
#include <functional> #include <functional>
@ -1180,5 +1179,4 @@ IStreamReader& operator>>(IStreamReader& lhs, T& rhs)
return lhs; return lhs;
} }
} }
#endif // ISTREAMREADER

View File

@ -1,5 +1,4 @@
#ifndef ISTREAMWRITER_HPP #pragma once
#define ISTREAMWRITER_HPP
#include "utf8proc.h" #include "utf8proc.h"
#include "IStream.hpp" #include "IStream.hpp"
@ -1176,5 +1175,4 @@ IStreamWriter& operator<<(IStreamWriter& lhs, const T& rhs)
return lhs; return lhs;
} }
} }
#endif // STREAMWRITER_HPP

View File

@ -1,5 +1,4 @@
#ifndef MCFILE_HPP #pragma once
#define MCFILE_HPP
#include "athena/Global.hpp" #include "athena/Global.hpp"
@ -33,4 +32,3 @@ private:
}; };
} // zelda } // zelda
#endif // MCFILE_HPP

View File

@ -1,5 +1,4 @@
#ifndef MCFILEREADER_HPP #pragma once
#define MCFILEREADER_HPP
#include "athena/MemoryReader.hpp" #include "athena/MemoryReader.hpp"
@ -47,4 +46,3 @@ public:
} // io } // io
} // zelda } // zelda
#endif // MCFILEREADER_HPP

View File

@ -1,5 +1,4 @@
#ifndef MCFILEWRITER_HPP #pragma once
#define MCFILEWRITER_HPP
#include "athena/Types.hpp" #include "athena/Types.hpp"
#include "athena/MemoryWriter.hpp" #include "athena/MemoryWriter.hpp"
@ -52,4 +51,3 @@ private:
} // io } // io
} // zelda } // zelda
#endif // MCFILEWRITER_HPP

View File

@ -1,5 +1,4 @@
#ifndef MCSLOT_HPP #pragma once
#define MCSLOT_HPP
#include "athena/Global.hpp" #include "athena/Global.hpp"
#include "athena/ZQuestFile.hpp" #include "athena/ZQuestFile.hpp"
@ -14,4 +13,3 @@ public:
} // Athena } // Athena
#endif // MCSLOT_HPP

View File

@ -1,5 +1,4 @@
#ifndef MEMORYREADER_HPP #pragma once
#define MEMORYREADER_HPP
#include <string> #include <string>
#include <memory> #include <memory>
@ -119,4 +118,3 @@ protected:
} // Athena } // Athena
#endif // MEMORYREADER_HPP

View File

@ -1,5 +1,4 @@
#ifndef MEMORYWRITER_HPP #pragma once
#define MEMORYWRITER_HPP
#include <string> #include <string>
#include <memory> #include <memory>
@ -158,4 +157,3 @@ private:
} }
#endif // MEMORYWRITER_HPP

View File

@ -1,5 +1,4 @@
#ifndef SAKURAGLOBAL_HPP #pragma once
#define SAKURAGLOBAL_HPP
#include "athena/Global.hpp" #include "athena/Global.hpp"
@ -29,4 +28,3 @@ typedef Vector2D<int> Vector2Di;
typedef Vector2D<float> Vector2Df; typedef Vector2D<float> Vector2Df;
} // Sakura } // Sakura
#endif // SAKURAGLOBAL_HPP

View File

@ -1,5 +1,4 @@
#ifndef SSFILE_HPP #pragma once
#define SSFILE_HPP
#include "athena/Global.hpp" #include "athena/Global.hpp"
@ -46,4 +45,3 @@ private:
}; };
} }
#endif // SSFILE_HPP

View File

@ -1,5 +1,4 @@
#ifndef SSFILEREADER_HPP #pragma once
#define SSFILEREADER_HPP
#include "athena/MemoryReader.hpp" #include "athena/MemoryReader.hpp"
@ -19,4 +18,3 @@ public:
} // io } // io
} // zelda } // zelda
#endif // SSFILEREADER_HPP

View File

@ -1,5 +1,4 @@
#ifndef SSFILEWRITER_HPP #pragma once
#define SSFILEWRITER_HPP
#include "athena/MemoryWriter.hpp" #include "athena/MemoryWriter.hpp"
@ -20,4 +19,3 @@ public:
}; };
} }
} }
#endif // SSFILEWRITER_HPP

View File

@ -1,5 +1,4 @@
#ifndef ATHENA_SOCKET_HPP #pragma once
#define ATHENA_SOCKET_HPP
#include <sys/types.h> #include <sys/types.h>
#include <fcntl.h> #include <fcntl.h>
@ -101,4 +100,3 @@ public:
} }
#endif // ATHENA_SOCKET_HPP

View File

@ -1,5 +1,4 @@
#ifndef SSPRITE_HPP #pragma once
#define SSPRITE_HPP
#include <vector> #include <vector>
#include <string> #include <string>
@ -69,4 +68,3 @@ private:
} // zelda } // zelda
#endif // SSPRITE_HPP

View File

@ -1,5 +1,4 @@
#ifndef SSPRITEFILEREADER_HPP #pragma once
#define SSPRITEFILEREADER_HPP
#include "athena/MemoryReader.hpp" #include "athena/MemoryReader.hpp"
@ -25,4 +24,3 @@ public:
} // zelda } // zelda
#endif // SSPRITEFILEREADER_HPP

View File

@ -1,5 +1,4 @@
#ifndef SSPRITEFILEWRITER_HPP #pragma once
#define SSPRITEFILEWRITER_HPP
#include "athena/MemoryWriter.hpp" #include "athena/MemoryWriter.hpp"
@ -25,4 +24,3 @@ public:
} // io } // io
} // zelda } // zelda
#endif // SSPRITEFILEWRITER_HPP

View File

@ -1,5 +1,4 @@
#ifndef SSPRITEFRAME_HPP #pragma once
#define SSPRITEFRAME_HPP
#include "athena/SakuraGlobal.hpp" #include "athena/SakuraGlobal.hpp"
@ -48,4 +47,3 @@ private:
} // zelda } // zelda
#endif // SSPRITEFRAME_HPP

View File

@ -1,5 +1,4 @@
#ifndef SSPRITEPART_HPP #pragma once
#define SSPRITEPART_HPP
#include "athena/SakuraGlobal.hpp" #include "athena/SakuraGlobal.hpp"
#include <vector> #include <vector>
@ -113,4 +112,3 @@ private:
}; };
} }
#endif // SSPRITEPART_HPP

View File

@ -1,5 +1,4 @@
#ifndef TYPES_HPP #pragma once
#define TYPES_HPP
#include <cstdint> #include <cstdint>
#include <cinttypes> #include <cinttypes>
@ -127,4 +126,3 @@ typedef union alignas(32)
#define DEPRECATED(func) func #define DEPRECATED(func) func
#endif #endif
#endif // TYPES_HPP

View File

@ -1,5 +1,4 @@
#ifndef VECTORWRITER_HPP #pragma once
#define VECTORWRITER_HPP
#include <string> #include <string>
#include <memory> #include <memory>
@ -60,4 +59,3 @@ protected:
} }
#endif // VECTORWRITER_HPP

View File

@ -1,5 +1,4 @@
#ifndef WIIBANNER_H #pragma once
#define WIIBANNER_H
#include <vector> #include <vector>
#include <string> #include <string>
@ -174,4 +173,3 @@ private:
}; };
} // zelda } // zelda
#endif // WIIBANNER_H

View File

@ -1,5 +1,4 @@
#ifndef WIIFILE_H #pragma once
#define WIIFILE_H
#include <string> #include <string>
#include <map> #include <map>
@ -220,4 +219,3 @@ private:
}; };
} // zelda } // zelda
#endif // WIIFILE_H

View File

@ -1,5 +1,4 @@
#ifndef WIIIMAGE_HPP #pragma once
#define WIIIMAGE_HPP
#include <memory> #include <memory>
#include "athena/Types.hpp" #include "athena/Types.hpp"
@ -75,4 +74,3 @@ private:
} // zelda } // zelda
#endif // WIIIMAGE_HPP

View File

@ -1,5 +1,4 @@
#ifndef WIISAVE_HPP #pragma once
#define WIISAVE_HPP
#include <unordered_map> #include <unordered_map>
#include <string> #include <string>
@ -82,4 +81,3 @@ private:
}; };
} // zelda } // zelda
#endif // WIISAVE_HPP

View File

@ -1,5 +1,4 @@
#ifndef WIISAVEREADER_HPP #pragma once
#define WIISAVEREADER_HPP
#include "athena/Global.hpp" #include "athena/Global.hpp"
#include "athena/MemoryReader.hpp" #include "athena/MemoryReader.hpp"
@ -52,4 +51,3 @@ private:
} // io } // io
} // zelda } // zelda
#endif // WIISAVEREADER_HPP

View File

@ -1,5 +1,4 @@
#ifndef WIISAVEWRITER_HPP #pragma once
#define WIISAVEWRITER_HPP
#include "athena/MemoryWriter.hpp" #include "athena/MemoryWriter.hpp"
@ -51,4 +50,3 @@ private:
} // io } // io
} // zelda } // zelda
#endif // WIISAVEWRITER_HPP

View File

@ -2,8 +2,7 @@
// Created by Jack Andersen on 2/16/18. // Created by Jack Andersen on 2/16/18.
// //
#ifndef URDE_YAMLCOMMON_HPP #pragma once
#define URDE_YAMLCOMMON_HPP
#include <cstring> #include <cstring>
#include <yaml.h> #include <yaml.h>
@ -198,4 +197,3 @@ int YAMLAthenaWriter(athena::io::IStreamWriter* writer,
} }
#endif //URDE_YAMLCOMMON_HPP

View File

@ -1,5 +1,4 @@
#ifndef YAMLDOCREADER #pragma once
#define YAMLDOCREADER
#include "YAMLCommon.hpp" #include "YAMLCommon.hpp"
@ -168,4 +167,3 @@ public:
} }
#endif // YAMLDOCREADER

View File

@ -1,5 +1,4 @@
#ifndef YAMLDOCWRITER #pragma once
#define YAMLDOCWRITER
#include "YAMLCommon.hpp" #include "YAMLCommon.hpp"
@ -133,4 +132,3 @@ public:
} }
#endif // YAMLDOCWRITER

View File

@ -1,5 +1,4 @@
#ifndef BN_H #pragma once
#define BN_H
#include "athena/Types.hpp" #include "athena/Types.hpp"
namespace bignum namespace bignum
@ -12,4 +11,3 @@ void exp(atUint8* d, const atUint8* a, const atUint8* N, atUint32 n, atUint8* e,
void inv(atUint8* d, atUint8* a, const atUint8* N, atUint32 n); void inv(atUint8* d, atUint8* a, const atUint8* N, atUint32 n);
} }
#endif // BN_H

View File

@ -1,5 +1,4 @@
#ifndef EC_H #pragma once
#define EC_H
#include "athena/Types.hpp" #include "athena/Types.hpp"
namespace ecc namespace ecc
@ -9,5 +8,4 @@ void makeECCert(atUint8* cert, atUint8* sig, const char* signer, const char* nam
void createECDSA(atUint8* R, atUint8* S, atUint8* k, atUint8* hash); void createECDSA(atUint8* R, atUint8* S, atUint8* k, atUint8* hash);
} }
#endif // EC_H