Renamed InputStream::GetPosition to InputStream::Tell (more consistent naming)

This commit is contained in:
Laurent Gomila 2011-07-20 08:03:40 +02:00
parent aada9ca545
commit 3d4bb1f568
3 changed files with 7 additions and 7 deletions

View File

@ -69,12 +69,12 @@ public :
virtual Int64 Seek(Int64 position) = 0;
////////////////////////////////////////////////////////////
/// \brief Return the current reading position in the stream
/// \brief Get the current reading position in the stream
///
/// \return The current position, or -1 on error.
///
////////////////////////////////////////////////////////////
virtual Int64 GetPosition() = 0;
virtual Int64 Tell() = 0;
////////////////////////////////////////////////////////////
/// \brief Return the size of the stream
@ -121,7 +121,7 @@ public :
///
/// Int64 Seek(Int64 position);
///
/// Int64 GetPosition();
/// Int64 Tell();
///
/// Int64 GetSize();
///

View File

@ -380,7 +380,7 @@ sf_count_t SoundFile::Stream::Seek(sf_count_t offset, int whence, void* userData
switch (whence)
{
case SEEK_SET : return stream->Seek(offset);
case SEEK_CUR : return stream->Seek(stream->GetPosition() + offset);
case SEEK_CUR : return stream->Seek(stream->Tell() + offset);
case SEEK_END : return stream->Seek(stream->GetSize() - offset);
default : return stream->Seek(0);
}
@ -391,7 +391,7 @@ sf_count_t SoundFile::Stream::Seek(sf_count_t offset, int whence, void* userData
sf_count_t SoundFile::Stream::Tell(void* userData)
{
sf::InputStream* stream = static_cast<sf::InputStream*>(userData);
return stream->GetPosition();
return stream->Tell();
}
} // namespace priv

View File

@ -61,12 +61,12 @@ namespace
void Skip(void* user, unsigned int size)
{
sf::InputStream* stream = static_cast<sf::InputStream*>(user);
stream->Seek(stream->GetPosition() + size);
stream->Seek(stream->Tell() + size);
}
int Eof(void* user)
{
sf::InputStream* stream = static_cast<sf::InputStream*>(user);
return stream->GetPosition() >= stream->GetSize();
return stream->Tell() >= stream->GetSize();
}
}