Skip to content

Commit

Permalink
KOTORBASE: Make DoorWalkmesh::in() parameters const
Browse files Browse the repository at this point in the history
The base class Engines::ObjectWalkmesh also has them const, so we need
to follow this for proper overriding.

This fixes Coverity Scan issues #1405872 and 1405873.
  • Loading branch information
DrMcCoy committed Oct 5, 2019
1 parent df82901 commit 9000339
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/engines/kotorbase/path/doorwalkmesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ DoorWalkmesh::DoorWalkmesh(Door *door) :
_door(door) {
}

bool DoorWalkmesh::in(glm::vec2 &minBox, glm::vec2 &maxBox) const {
bool DoorWalkmesh::in(const glm::vec2 &minBox, const glm::vec2 &maxBox) const {
if (_door->isOpen())
return false;

return ObjectWalkmesh::in(minBox, maxBox);
}

bool DoorWalkmesh::in(glm::vec2 &point) const {
bool DoorWalkmesh::in(const glm::vec2 &point) const {
if (_door->isOpen())
return false;

Expand Down
4 changes: 2 additions & 2 deletions src/engines/kotorbase/path/doorwalkmesh.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ class DoorWalkmesh : public ObjectWalkmesh {
const std::vector<float> &getVertices() const;
const std::vector<uint32> &getFaces() const;

bool in(glm::vec2 &minBox, glm::vec2 &maxBox) const;
bool in(glm::vec2 &point) const;
bool in(const glm::vec2 &minBox, const glm::vec2 &maxBox) const;
bool in(const glm::vec2 &point) const;
bool findIntersection(const glm::vec3 &start, const glm::vec3 &end,
glm::vec3 &intersect) const;

Expand Down

0 comments on commit 9000339

Please sign in to comment.