Fix a bunch of missing cmath includes

...as well as missing std:: namespace specifiers
This commit is contained in:
Vlad Ivanov 2017-01-25 22:20:26 +03:00
parent 4c55039c22
commit f0ba717142
4 changed files with 7 additions and 3 deletions

View File

@ -10,6 +10,7 @@
#include "xenia/cpu/compiler/passes/constant_propagation_pass.h" #include "xenia/cpu/compiler/passes/constant_propagation_pass.h"
#include <gflags/gflags.h> #include <gflags/gflags.h>
#include <cmath>
#include "xenia/base/assert.h" #include "xenia/base/assert.h"
#include "xenia/base/profiling.h" #include "xenia/base/profiling.h"
@ -303,10 +304,10 @@ bool ConstantPropagationPass::Run(HIRBuilder* builder) {
case OPCODE_IS_NAN: case OPCODE_IS_NAN:
if (i->src1.value->IsConstant()) { if (i->src1.value->IsConstant()) {
if (i->src1.value->type == FLOAT32_TYPE && if (i->src1.value->type == FLOAT32_TYPE &&
isnan(i->src1.value->constant.f32)) { std::isnan(i->src1.value->constant.f32)) {
v->set_constant(uint8_t(1)); v->set_constant(uint8_t(1));
} else if (i->src1.value->type == FLOAT64_TYPE && } else if (i->src1.value->type == FLOAT64_TYPE &&
isnan(i->src1.value->constant.f64)) { std::isnan(i->src1.value->constant.f64)) {
v->set_constant(uint8_t(1)); v->set_constant(uint8_t(1));
} else { } else {
v->set_constant(uint8_t(0)); v->set_constant(uint8_t(0));

View File

@ -10,6 +10,7 @@
#include "xenia/gpu/command_processor.h" #include "xenia/gpu/command_processor.h"
#include <algorithm> #include <algorithm>
#include <cmath>
#include "xenia/base/byte_stream.h" #include "xenia/base/byte_stream.h"
#include "xenia/base/logging.h" #include "xenia/base/logging.h"

View File

@ -10,6 +10,7 @@
#include "xenia/gpu/texture_info.h" #include "xenia/gpu/texture_info.h"
#include <algorithm> #include <algorithm>
#include <cmath>
#include <cstring> #include <cstring>
#include "third_party/xxhash/xxhash.h" #include "third_party/xxhash/xxhash.h"

View File

@ -18,8 +18,9 @@
#ifdef IGNORED_LLVM_XENIA #ifdef IGNORED_LLVM_XENIA
#include "llvm/Support/SwapByteOrder.h" #include "llvm/Support/SwapByteOrder.h"
#endif // IGNORED_LLVM_XENIA #endif // IGNORED_LLVM_XENIA
#include "llvm/Support/type_traits.h" #include <cmath>
#include <cstring> #include <cstring>
#include "llvm/Support/type_traits.h"
#ifdef _MSC_VER #ifdef _MSC_VER
#include <intrin.h> #include <intrin.h>