Fixed a few typos/style issues
This commit is contained in:
parent
0c2f306c17
commit
aa9a6dec89
23 changed files with 72 additions and 64 deletions
|
@ -244,9 +244,9 @@ void InputSoundFile::close()
|
|||
if (m_streamOwned)
|
||||
{
|
||||
delete m_stream;
|
||||
m_stream = NULL;
|
||||
m_streamOwned = false;
|
||||
}
|
||||
m_stream = NULL;
|
||||
|
||||
// Reset the sound file attributes
|
||||
m_sampleCount = 0;
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
namespace
|
||||
{
|
||||
// register all the built-in readers and writers if not already done
|
||||
// Register all the built-in readers and writers if not already done
|
||||
void ensureDefaultReadersWritersRegistered()
|
||||
{
|
||||
static bool registered = false;
|
||||
|
|
|
@ -56,7 +56,7 @@ public:
|
|||
////////////////////////////////////////////////////////////
|
||||
static bool check(InputStream& stream);
|
||||
|
||||
public :
|
||||
public:
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Default constructor
|
||||
|
|
|
@ -54,7 +54,7 @@ public:
|
|||
////////////////////////////////////////////////////////////
|
||||
static bool check(InputStream& stream);
|
||||
|
||||
public :
|
||||
public:
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Default constructor
|
||||
|
|
|
@ -54,7 +54,7 @@ public:
|
|||
////////////////////////////////////////////////////////////
|
||||
static bool check(InputStream& stream);
|
||||
|
||||
public :
|
||||
public:
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Default constructor
|
||||
|
|
|
@ -55,7 +55,7 @@ public:
|
|||
////////////////////////////////////////////////////////////
|
||||
static bool check(const std::string& filename);
|
||||
|
||||
public :
|
||||
public:
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Default constructor
|
||||
|
|
|
@ -55,7 +55,7 @@ public:
|
|||
////////////////////////////////////////////////////////////
|
||||
static bool check(const std::string& filename);
|
||||
|
||||
public :
|
||||
public:
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Default constructor
|
||||
|
|
|
@ -55,7 +55,7 @@ public:
|
|||
////////////////////////////////////////////////////////////
|
||||
static bool check(const std::string& filename);
|
||||
|
||||
public :
|
||||
public:
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Default constructor
|
||||
|
|
|
@ -56,13 +56,13 @@ FileInputStream::~FileInputStream()
|
|||
////////////////////////////////////////////////////////////
|
||||
bool FileInputStream::open(const std::string& filename)
|
||||
{
|
||||
#ifndef ANDROID
|
||||
m_file.open(filename.c_str(), std::ios::binary);
|
||||
return m_file.good();
|
||||
#else
|
||||
#ifdef ANDROID
|
||||
if (m_file)
|
||||
delete m_file;
|
||||
m_file = new sf::priv::ResourceStream(filename);
|
||||
#else
|
||||
m_file.open(filename.c_str(), std::ios::binary);
|
||||
return m_file.good();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -70,11 +70,11 @@ bool FileInputStream::open(const std::string& filename)
|
|||
////////////////////////////////////////////////////////////
|
||||
Int64 FileInputStream::read(void* data, Int64 size)
|
||||
{
|
||||
#ifndef ANDROID
|
||||
#ifdef ANDROID
|
||||
return m_file->read(data, size);
|
||||
#else
|
||||
m_file.read(static_cast<char*>(data), size);
|
||||
return m_file.gcount();
|
||||
#else
|
||||
return m_file->read(data, size);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -82,13 +82,13 @@ Int64 FileInputStream::read(void* data, Int64 size)
|
|||
////////////////////////////////////////////////////////////
|
||||
Int64 FileInputStream::seek(Int64 position)
|
||||
{
|
||||
#ifndef ANDROID
|
||||
#ifdef ANDROID
|
||||
return m_file->seek(position);
|
||||
#else
|
||||
if (m_file.eof() || m_file.fail())
|
||||
m_file.clear();
|
||||
m_file.seekg(position);
|
||||
return tell();
|
||||
#else
|
||||
return m_file->seek(position);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -96,10 +96,10 @@ Int64 FileInputStream::seek(Int64 position)
|
|||
////////////////////////////////////////////////////////////
|
||||
Int64 FileInputStream::tell()
|
||||
{
|
||||
#ifndef ANDROID
|
||||
return m_file.tellg();
|
||||
#else
|
||||
#ifdef ANDROID
|
||||
return m_file->tell();
|
||||
#else
|
||||
return m_file.tellg();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -107,14 +107,14 @@ Int64 FileInputStream::tell()
|
|||
////////////////////////////////////////////////////////////
|
||||
Int64 FileInputStream::getSize()
|
||||
{
|
||||
#ifndef ANDROID
|
||||
#ifdef ANDROID
|
||||
return m_file->getSize();
|
||||
#else
|
||||
std::ifstream::pos_type pos = m_file.tellg();
|
||||
m_file.seekg(0, std::ios::end);
|
||||
std::ifstream::pos_type size = m_file.tellg();
|
||||
m_file.seekg(pos);
|
||||
return size;
|
||||
#else
|
||||
return m_file->getSize();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
////////////////////////////////////////////////////////////
|
||||
//
|
||||
// SFML - Simple and Fast Multimedia Library
|
||||
// Copyright (C) 2007-2013 Laurent Gomila (laurent@sfml-dev.org)
|
||||
// Copyright (C) 2007-2015 Laurent Gomila (laurent@sfml-dev.org)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
////////////////////////////////////////////////////////////
|
||||
//
|
||||
// SFML - Simple and Fast Multimedia Library
|
||||
// Copyright (C) 2007-2013 Laurent Gomila (laurent@sfml-dev.org)
|
||||
// Copyright (C) 2007-2015 Laurent Gomila (laurent@sfml-dev.org)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
////////////////////////////////////////////////////////////
|
||||
//
|
||||
// SFML - Simple and Fast Multimedia Library
|
||||
// Copyright (C) 2007-2013 Laurent Gomila (laurent@sfml-dev.org)
|
||||
// Copyright (C) 2007-2015 Laurent Gomila (laurent@sfml-dev.org)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
////////////////////////////////////////////////////////////
|
||||
//
|
||||
// SFML - Simple and Fast Multimedia Library
|
||||
// Copyright (C) 2007-2013 Laurent Gomila (laurent@sfml-dev.org)
|
||||
// Copyright (C) 2007-2015 Laurent Gomila (laurent@sfml-dev.org)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
////////////////////////////////////////////////////////////
|
||||
//
|
||||
// SFML - Simple and Fast Multimedia Library
|
||||
// Copyright (C) 2007-2013 Laurent Gomila (laurent@sfml-dev.org)
|
||||
// Copyright (C) 2007-2015 Laurent Gomila (laurent@sfml-dev.org)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue