From 425decdf7e9284d15aa726e3ae96b9942fb0e3ea Mon Sep 17 00:00:00 2001 From: IronClawTrem Date: Sun, 16 Feb 2020 03:40:06 +0000 Subject: create tremded branch --- src/script/rapidjson/file.hpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/script/rapidjson/file.hpp (limited to 'src/script/rapidjson/file.hpp') diff --git a/src/script/rapidjson/file.hpp b/src/script/rapidjson/file.hpp new file mode 100644 index 0000000..5e098d4 --- /dev/null +++ b/src/script/rapidjson/file.hpp @@ -0,0 +1,21 @@ +#ifndef __LUA_RAPIDJSION_FILE_HPP__ +#define __LUA_RAPIDJSION_FILE_HPP__ + +#include + +namespace file +{ + inline FILE* open(const char* filename, const char* mode) + { +#if WIN32 + FILE* fp = nullptr; + fopen_s(&fp, filename, mode); + return fp; +#else + return fopen(filename, mode); +#endif + } +} + +#endif + -- cgit