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

Function getUniqueId

src/SFML/Graphics/Texture.cpp:57–62  ·  view source on GitHub ↗

Thread-safe unique identifier generator, is used for states cache (see RenderTarget)

Source from the content-addressed store, hash-verified

55// Thread-safe unique identifier generator,
56// is used for states cache (see RenderTarget)
57std::uint64_t getUniqueId() noexcept
58{
59 static std::atomic<std::uint64_t> id(1); // start at 1, zero is "no texture"
60
61 return id.fetch_add(1);
62}
63} // namespace TextureImpl
64} // namespace
65

Callers 3

TextureMethod · 0.70
resizeMethod · 0.70
updateMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected