Skip to content

Commit

Permalink
fixed gcc
Browse files Browse the repository at this point in the history
  • Loading branch information
x39 committed Aug 25, 2018
1 parent 30af3e0 commit dae4a2c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions sqfvm-cpp/arraydata.h
Expand Up @@ -5,13 +5,13 @@
#include <array>

#include "data.h"
#include "type.h"


namespace sqf
{
class value;
class virtualmachine;
enum type;
class arraydata : public data
{
private:
Expand Down Expand Up @@ -42,4 +42,4 @@ namespace sqf

bool check_type(virtualmachine*, type, size_t) const;
};
}
}
4 changes: 2 additions & 2 deletions sqfvm-cpp/mathcmds.cpp
Expand Up @@ -157,15 +157,15 @@ namespace
}
inline double vectorMagnitudeSqr(std::array<double, 3> 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<double, 3> arr)
{
return std::sqrt(vectorMagnitudeSqr(arr));
}
inline double vectorDistanceSqr(std::array<double, 3> left, std::array<double, 3> 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<double, 3> left, std::array<double, 3> right)
{
Expand Down
2 changes: 1 addition & 1 deletion sqfvm-cpp/virtualmachine.cpp
Expand Up @@ -582,7 +582,7 @@ void sqf::virtualmachine::drop_group(std::shared_ptr<sqf::groupdata> 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();
Expand Down

0 comments on commit dae4a2c

Please sign in to comment.