MCPcopy Create free account
hub / github.com/SFML/SFML / getUniqueId

Function getUniqueId

src/SFML/Graphics/Font.cpp:91–96  ·  view source on GitHub ↗

Thread-safe unique identifier generator

Source from the content-addressed store, hash-verified

89
90// Thread-safe unique identifier generator
91std::uint64_t getUniqueId() noexcept
92{
93 static std::atomic<std::uint64_t> id(1); // start at 1, zero is "no font"
94
95 return id.fetch_add(1);
96}
97} // namespace
98
99

Callers 1

openFromStreamImplMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected