Add some overflow checks to FS
This commit is contained in:
23
deps/ox/src/ox/std/math.hpp
vendored
Normal file
23
deps/ox/src/ox/std/math.hpp
vendored
Normal 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;
|
||||
}
|
||||
|
||||
}
|
2
deps/ox/src/ox/std/std.hpp
vendored
2
deps/ox/src/ox/std/std.hpp
vendored
@@ -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"
|
||||
|
Reference in New Issue
Block a user