Add some overflow checks to FS

This commit is contained in:
2018-01-29 21:56:19 -06:00
parent 04e5af6fe6
commit 3600d88987
7 changed files with 122 additions and 47 deletions

23
deps/ox/src/ox/std/math.hpp vendored Normal file
View File

@@ -0,0 +1,23 @@
/*
* Copyright 2015 - 2017 gtalent2@gmail.com
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#pragma once
namespace ox {
template<typename T>
inline const T &min(const T &a, const T &b) {
return a < b ? a : b;
}
template<typename T>
inline const T &max(const T &a, const T &b) {
return a > b ? a : b;
}
}

View File

@@ -5,10 +5,12 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#pragma once
#include "bitops.hpp"
#include "byteswap.hpp"
#include "math.hpp"
#include "memops.hpp"
#include "random.hpp"
#include "strops.hpp"