| 329 | |
| 330 | template <class T> |
| 331 | AI_FORCE_INLINE bool IOStreamBuffer<T>::getNextBlock(std::vector<T> &buffer) { |
| 332 | // Return the last block-value if getNextLine was used before |
| 333 | if (0 != m_cachePos) { |
| 334 | buffer = std::vector<T>(m_cache.begin() + m_cachePos, m_cache.end()); |
| 335 | m_cachePos = 0; |
| 336 | } else { |
| 337 | if (!readNextBlock()) { |
| 338 | return false; |
| 339 | } |
| 340 | |
| 341 | buffer = std::vector<T>(m_cache.begin(), m_cache.end()); |
| 342 | } |
| 343 | |
| 344 | return true; |
| 345 | } |
| 346 | |
| 347 | } // namespace Assimp |
| 348 |