| 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 | { |