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

Method operator>

launcher/Version.cpp:33–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31 return *this < other || *this == other;
32}
33bool Version::operator>(const Version &other) const
34{
35 const int size = qMax(m_sections.size(), other.m_sections.size());
36 for (int i = 0; i < size; ++i)
37 {
38 const Section sec1 = (i >= m_sections.size()) ? Section("0") : m_sections.at(i);
39 const Section sec2 =
40 (i >= other.m_sections.size()) ? Section("0") : other.m_sections.at(i);
41 if (sec1 != sec2)
42 {
43 return sec1 > sec2;
44 }
45 }
46
47 return false;
48}
49bool Version::operator>=(const Version &other) const
50{
51 return *this > other || *this == other;

Callers

nothing calls this directly

Calls 3

SectionClass · 0.85
sizeMethod · 0.45
atMethod · 0.45

Tested by

no test coverage detected