MCPcopy Create free account
hub / github.com/aenu1/aps3e / to_string

Method to_string

app/src/main/cpp/rpcs3/Utilities/version.cpp:27–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25 }
26
27 std::string version::to_string() const
28 {
29 std::string version = std::to_string(hi()) + "." + std::to_string(mid());
30
31 if (lo())
32 {
33 version += '.';
34 version += std::to_string(lo());
35 }
36
37 if (type() != version_type::release)
38 {
39 if (!postfix().empty())
40 {
41 version += "-" + postfix();
42 }
43
44 version += ' ';
45 version += utils::to_string(type());
46
47 if (type_index() > 1)
48 {
49 version += " " + std::to_string(type_index());
50 }
51 }
52
53 return version;
54 }
55
56 // Based on https://www.geeksforgeeks.org/compare-two-version-numbers/
57 int compare_versions(const std::string& v1, const std::string& v2, bool& ok)

Callers

nothing calls this directly

Calls 6

postfixFunction · 0.85
to_stringFunction · 0.70
typeEnum · 0.70
hiFunction · 0.50
loFunction · 0.50
emptyMethod · 0.45

Tested by

no test coverage detected