artem-ogre / CDT

Constrained Delaunay Triangulation (C++)
https://artem-ogre.github.io/CDT/
Mozilla Public License 2.0
1.07k stars 133 forks source link

inline missing #3

Closed KuDeSnik33ra closed 4 years ago

KuDeSnik33ra commented 4 years ago

Theese functions should be marked inline - otherwise, compiling projects with multiple cpp files, including CDT, will fail. CDTUtils.hpp,99

Edge::Edge(VertInd iV1, VertInd iV2)
    : m_vertices(
          iV1 < iV2 ? std::make_pair(iV1, iV2) : std::make_pair(iV2, iV1))
{}

bool Edge::operator==(const Edge& other) const
{
    return m_vertices == other.m_vertices;
}

VertInd Edge::v1() const
{
    return m_vertices.first;
}

VertInd Edge::v2() const
{
    return m_vertices.second;
}

const std::pair<VertInd, VertInd>& Edge::verts() const
{
    return m_vertices;
}
artem-ogre commented 4 years ago

What's the compilation error? Do you have CDT_USE_AS_COMPILED_LIBRARY defined?

artem-ogre commented 4 years ago

I was able to reproduce it.

KuDeSnik33ra commented 4 years ago

Hello, thanks!

artem-ogre commented 4 years ago

Thanks a lot for reporting the issue! Fixed in: f53d788