MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / useCount

Method useCount

src/Core/Graphics/Texture.cpp:213–228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

211 }
212
213 unsigned Texture::useCount()
214 {
215 if (std::holds_alternative<sf::Texture>(m_texture))
216 {
217 return 1;
218 }
219 if (std::holds_alternative<std::shared_ptr<sf::Texture>>(m_texture))
220 {
221 return std::get<std::shared_ptr<sf::Texture>>(m_texture).use_count();
222 }
223 if (std::holds_alternative<const sf::Texture*>(m_texture))
224 {
225 return 0;
226 }
227 return false;
228 }
229
230 Texture::operator sf::Texture&()
231 {

Callers 1

cleanMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected