From dae4a2c98fbb6dc9bcfff5e409180ae5549388a7 Mon Sep 17 00:00:00 2001 From: x39 Date: Sat, 25 Aug 2018 16:56:14 +0000 Subject: [PATCH] fixed gcc --- sqfvm-cpp/arraydata.h | 4 ++-- sqfvm-cpp/mathcmds.cpp | 4 ++-- sqfvm-cpp/virtualmachine.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sqfvm-cpp/arraydata.h b/sqfvm-cpp/arraydata.h index 94e4049a..0bff8784 100644 --- a/sqfvm-cpp/arraydata.h +++ b/sqfvm-cpp/arraydata.h @@ -5,13 +5,13 @@ #include #include "data.h" +#include "type.h" namespace sqf { class value; class virtualmachine; - enum type; class arraydata : public data { private: @@ -42,4 +42,4 @@ namespace sqf bool check_type(virtualmachine*, type, size_t) const; }; -} \ No newline at end of file +} diff --git a/sqfvm-cpp/mathcmds.cpp b/sqfvm-cpp/mathcmds.cpp index e969ddd4..a1331c4c 100644 --- a/sqfvm-cpp/mathcmds.cpp +++ b/sqfvm-cpp/mathcmds.cpp @@ -157,7 +157,7 @@ namespace } inline double vectorMagnitudeSqr(std::array arr) { - return std::powf(arr[0], 2) + std::powf(arr[1], 2) + std::powf(arr[2], 2); + return std::pow(arr[0], 2) + std::pow(arr[1], 2) + std::pow(arr[2], 2); } inline double vectorMagnitude(std::array arr) { @@ -165,7 +165,7 @@ namespace } inline double vectorDistanceSqr(std::array left, std::array right) { - return std::powf(left[0] - right[0], 2) + std::powf(left[1] - right[1], 2) + std::powf(left[2] - right[2], 2); + return std::pow(left[0] - right[0], 2) + std::pow(left[1] - right[1], 2) + std::pow(left[2] - right[2], 2); } inline double vectorDistance(std::array left, std::array right) { diff --git a/sqfvm-cpp/virtualmachine.cpp b/sqfvm-cpp/virtualmachine.cpp index 14197dd9..4806eb87 100644 --- a/sqfvm-cpp/virtualmachine.cpp +++ b/sqfvm-cpp/virtualmachine.cpp @@ -582,7 +582,7 @@ void sqf::virtualmachine::drop_group(std::shared_ptr grp) auto& grpList = mgroups[grp->side()->side()]; for (size_t i = 0; i < grpList.size(); i++) { - if (grpList[i].get() == grp) + if (grpList[i].get() == grp.get()) { grpList[i] = grpList.back(); grpList.pop_back();