MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / operator==

Method operator==

launcher/Version.cpp:53–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51 return *this > other || *this == other;
52}
53bool Version::operator==(const Version &other) const
54{
55 const int size = qMax(m_sections.size(), other.m_sections.size());
56 for (int i = 0; i < size; ++i)
57 {
58 const Section sec1 = (i >= m_sections.size()) ? Section("0") : m_sections.at(i);
59 const Section sec2 =
60 (i >= other.m_sections.size()) ? Section("0") : other.m_sections.at(i);
61 if (sec1 != sec2)
62 {
63 return false;
64 }
65 }
66
67 return true;
68}
69bool Version::operator!=(const Version &other) const
70{
71 return !operator==(other);

Callers

nothing calls this directly

Calls 3

SectionClass · 0.85
sizeMethod · 0.45
atMethod · 0.45

Tested by

no test coverage detected