///////////////////////////////////////////////////////
| 125 | |
| 126 | //////////////////////////////////////////////////////////// |
| 127 | std::optional<std::size_t> FileInputStream::tell() |
| 128 | { |
| 129 | #ifdef SFML_SYSTEM_ANDROID |
| 130 | if (priv::getActivityStatesPtr() != nullptr) |
| 131 | { |
| 132 | if (!m_androidFile) |
| 133 | return std::nullopt; |
| 134 | return m_androidFile->tell(); |
| 135 | } |
| 136 | #endif |
| 137 | if (!m_file) |
| 138 | return std::nullopt; |
| 139 | const auto position = std::ftell(m_file.get()); |
| 140 | return position < 0 ? std::nullopt : std::optional<std::size_t>(position); |
| 141 | } |
| 142 | |
| 143 | |
| 144 | //////////////////////////////////////////////////////////// |
no test coverage detected