Source code changes.

* Changed newlines to \n.
* Removed whitespace before colons.
* Fixed several alignments.
This commit is contained in:
Stefan Schindler 2014-09-30 16:07:25 +02:00
parent b27cbd5036
commit f24ca9a840
268 changed files with 40227 additions and 40227 deletions

View file

@ -124,7 +124,7 @@ endif()
# setup Mac OS X stuff
if(SFML_OS_MACOSX)
# SFML_BUILD_FRAMEWORKS needs two things :
# SFML_BUILD_FRAMEWORKS needs two things:
# first, it's available only for release
# (because cmake currently doesn't allow specifying a custom framework name so XXX-d is not possible)
# secondly, it works only with BUILD_SHARED_LIBS enabled
@ -229,7 +229,7 @@ else()
COMMAND cp -r ${PROJECT_SOURCE_DIR}/include/SFML/* $<TARGET_FILE_DIR:SFML>/Headers)
# adapt install directory to allow distributing dylibs/frameworks in users frameworks/application bundle
# NOTE : it's not required to link agains SFML.framework
# NOTE: it's not required to link agains SFML.framework
set_target_properties(SFML PROPERTIES
BUILD_WITH_INSTALL_RPATH 1
INSTALL_NAME_DIR "@executable_path/../Frameworks")

View file

@ -82,7 +82,7 @@ find_path(SFML_INCLUDE_DIR SFML/Config.hpp
set(SFML_VERSION_OK TRUE)
if(SFML_FIND_VERSION AND SFML_INCLUDE_DIR)
# extract the major and minor version numbers from SFML/Config.hpp
# we have to handle framework a little bit differently :
# we have to handle framework a little bit differently:
if("${SFML_INCLUDE_DIR}" MATCHES "SFML.framework")
set(SFML_CONFIG_HPP_INPUT "${SFML_INCLUDE_DIR}/Headers/Config.hpp")
else()

View file

@ -1095,57 +1095,57 @@ endif()
set(LIBRARY_OUTPUT_PATH_ROOT ${CMAKE_LIBRARY_DIR})
# Variables controlling behavior or set by cmake toolchain:
# ANDROID_ABI : "armeabi-v7a" (default), "armeabi", "armeabi-v7a with NEON", "armeabi-v7a with VFPV3", "armeabi-v6 with VFP", "x86", "mips"
# ANDROID_NATIVE_API_LEVEL : 3,4,5,8,9,14 (depends on NDK version)
# ANDROID_SET_OBSOLETE_VARIABLES : ON/OFF
# ANDROID_USE_STLPORT : OFF/ON - EXPERIMENTAL!!!
# ANDROID_FORBID_SYGWIN : ON/OFF
# ANDROID_NO_UNDEFINED : ON/OFF
# ANDROID_SO_UNDEFINED : OFF/ON (default depends on NDK version)
# ANDROID_FUNCTION_LEVEL_LINKING : ON/OFF
# ANDROID_ABI: "armeabi-v7a" (default), "armeabi", "armeabi-v7a with NEON", "armeabi-v7a with VFPV3", "armeabi-v6 with VFP", "x86", "mips"
# ANDROID_NATIVE_API_LEVEL: 3,4,5,8,9,14 (depends on NDK version)
# ANDROID_SET_OBSOLETE_VARIABLES: ON/OFF
# ANDROID_USE_STLPORT: OFF/ON - EXPERIMENTAL!!!
# ANDROID_FORBID_SYGWIN: ON/OFF
# ANDROID_NO_UNDEFINED: ON/OFF
# ANDROID_SO_UNDEFINED: OFF/ON (default depends on NDK version)
# ANDROID_FUNCTION_LEVEL_LINKING: ON/OFF
# Variables that takes effect only at first run:
# ANDROID_FORCE_ARM_BUILD : ON/OFF
# LIBRARY_OUTPUT_PATH_ROOT : <any valid path>
# ANDROID_FORCE_ARM_BUILD: ON/OFF
# LIBRARY_OUTPUT_PATH_ROOT: <any valid path>
# Can be set only at the first run:
# ANDROID_NDK
# ANDROID_STANDALONE_TOOLCHAIN
# ANDROID_TOOLCHAIN_NAME : "arm-linux-androideabi-4.4.3" or "arm-linux-androideabi-4.6" or "mipsel-linux-android-4.4.3" or "mipsel-linux-android-4.6" or "x86-4.4.3" or "x86-4.6"
# ANDROID_TOOLCHAIN_NAME: "arm-linux-androideabi-4.4.3" or "arm-linux-androideabi-4.6" or "mipsel-linux-android-4.4.3" or "mipsel-linux-android-4.6" or "x86-4.4.3" or "x86-4.6"
# Obsolete:
# ANDROID_API_LEVEL : superseded by ANDROID_NATIVE_API_LEVEL
# ARM_TARGET : superseded by ANDROID_ABI
# ARM_TARGETS : superseded by ANDROID_ABI (can be set only)
# ANDROID_NDK_TOOLCHAIN_ROOT : superseded by ANDROID_STANDALONE_TOOLCHAIN (can be set only)
# ANDROID_LEVEL : superseded by ANDROID_NATIVE_API_LEVEL (completely removed)
# ANDROID_API_LEVEL: superseded by ANDROID_NATIVE_API_LEVEL
# ARM_TARGET: superseded by ANDROID_ABI
# ARM_TARGETS: superseded by ANDROID_ABI (can be set only)
# ANDROID_NDK_TOOLCHAIN_ROOT: superseded by ANDROID_STANDALONE_TOOLCHAIN (can be set only)
# ANDROID_LEVEL: superseded by ANDROID_NATIVE_API_LEVEL (completely removed)
#
# Primary read-only variables:
# ANDROID : always TRUE
# ARMEABI : TRUE for arm v6 and older devices
# ARMEABI_V6 : TRUE for arm v6
# ARMEABI_V7A : TRUE for arm v7a
# NEON : TRUE if NEON unit is enabled
# VFPV3 : TRUE if VFP version 3 is enabled
# X86 : TRUE if configured for x86
# BUILD_ANDROID : always TRUE
# BUILD_WITH_ANDROID_NDK : TRUE if NDK is used
# BUILD_WITH_STANDALONE_TOOLCHAIN : TRUE if standalone toolchain is used
# ANDROID_NDK_HOST_SYSTEM_NAME : "windows", "linux-x86" or "darwin-x86" depending on host platform
# ANDROID_NDK_HOST_SYSTEM_ARCH : "x86", "x64" depending on host platform
# ANDROID_NDK_ABI_NAME : "armeabi", "armeabi-v7a" or "x86" depending on ANDROID_ABI
# ANDROID_ARCH_NAME : "arm" or "x86" or "mips" depending on ANDROID_ABI
# TOOL_OS_SUFFIX : "" or ".exe" depending on host platform
# ANDROID_SYSROOT : path to the compiler sysroot
# ANDROID: always TRUE
# ARMEABI: TRUE for arm v6 and older devices
# ARMEABI_V6: TRUE for arm v6
# ARMEABI_V7A: TRUE for arm v7a
# NEON: TRUE if NEON unit is enabled
# VFPV3: TRUE if VFP version 3 is enabled
# X86: TRUE if configured for x86
# BUILD_ANDROID: always TRUE
# BUILD_WITH_ANDROID_NDK: TRUE if NDK is used
# BUILD_WITH_STANDALONE_TOOLCHAIN: TRUE if standalone toolchain is used
# ANDROID_NDK_HOST_SYSTEM_NAME: "windows", "linux-x86" or "darwin-x86" depending on host platform
# ANDROID_NDK_HOST_SYSTEM_ARCH: "x86", "x64" depending on host platform
# ANDROID_NDK_ABI_NAME: "armeabi", "armeabi-v7a" or "x86" depending on ANDROID_ABI
# ANDROID_ARCH_NAME: "arm" or "x86" or "mips" depending on ANDROID_ABI
# TOOL_OS_SUFFIX: "" or ".exe" depending on host platform
# ANDROID_SYSROOT: path to the compiler sysroot
# ANDROID_SYSTEM_INCLUDE_DIRS
# ANDROID_SYSTEM_LIB_DIRS
# Obsolete:
# ARMEABI_NDK_NAME : superseded by ANDROID_NDK_ABI_NAME
# ARMEABI_NDK_NAME: superseded by ANDROID_NDK_ABI_NAME
#
# Secondary (less stable) read-only variables:
# ANDROID_COMPILER_VERSION : GCC version used
# ANDROID_CXX_FLAGS : C/C++ compiler flags required by Android platform
# ANDROID_SUPPORTED_ABIS : list of currently allowed values for ANDROID_ABI
# ANDROID_TOOLCHAIN_MACHINE_NAME : "arm-linux-androideabi", "arm-eabi" or "i686-android-linux"
# ANDROID_TOOLCHAIN_ROOT : path to the top level of toolchain (standalone or placed inside NDK)
# ANDROID_SUPPORTED_NATIVE_API_LEVELS : list of native API levels found inside NDK
# ANDROID_COMPILER_VERSION: GCC version used
# ANDROID_CXX_FLAGS: C/C++ compiler flags required by Android platform
# ANDROID_SUPPORTED_ABIS: list of currently allowed values for ANDROID_ABI
# ANDROID_TOOLCHAIN_MACHINE_NAME: "arm-linux-androideabi", "arm-eabi" or "i686-android-linux"
# ANDROID_TOOLCHAIN_ROOT: path to the top level of toolchain (standalone or placed inside NDK)
# ANDROID_SUPPORTED_NATIVE_API_LEVELS: list of native API levels found inside NDK
#
# Defaults:
# ANDROID_DEFAULT_NDK_API_LEVEL

View file

@ -8,7 +8,7 @@
/// at <a href="http://www.sfml-dev.org/">www.sfml-dev.org</a>.
///
/// \section example Short example
/// Here is a short example, to show you how simple it is to use SFML :
/// Here is a short example, to show you how simple it is to use SFML:
///
/// \code
///
@ -47,7 +47,7 @@
/// sf::Event event;
/// while (window.pollEvent(event))
/// {
/// // Close window : exit
/// // Close window: exit
/// if (event.type == sf::Event::Closed)
/// window.close();
/// }

View file

@ -176,8 +176,8 @@ int main()
// Process it
switch (event.type)
{
// Any key is pressed : quit
case KeyPress :
// Any key is pressed: quit
case KeyPress:
running = false;
break;
}

View file

@ -48,7 +48,7 @@ foreach(XIB ${XIBS})
--compile ${XIB_OUTPUT_PATH}/${XIB}.nib
${XIB_INPUT_PATH}/${XIB}.xib
COMMENT "Compiling ${XIB}.xib")
# deactivated options : --warnings --notices
# deactivated options: --warnings --notices
endforeach()
# add install rule

View file

@ -27,8 +27,8 @@
#import <SFML/Graphics.hpp>
/*
* NB : We need pointers for C++ objects fields in Obj-C interface !
* The recommended way is to use PIMP idiom.
* NB: We need pointers for C++ objects fields in Obj-C interface !
* The recommended way is to use PIMPL idiom.
*
* It's elegant. Moreover, we do no constrain
* other file including this one to be Obj-C++.

View file

@ -29,7 +29,7 @@ int main()
sf::IpAddress address;
do
{
std::cout << "Enter the FTP server address : ";
std::cout << "Enter the FTP server address: ";
std::cin >> address;
}
while (address == sf::IpAddress::None);
@ -43,9 +43,9 @@ int main()
// Ask for user name and password
std::string user, password;
std::cout << "User name : ";
std::cout << "User name: ";
std::cin >> user;
std::cout << "Password : ";
std::cout << "Password: ";
std::cin >> password;
// Login to the server
@ -79,7 +79,7 @@ int main()
switch (choice)
{
default :
default:
{
// Wrong choice
std::cout << "Invalid choice!" << std::endl;
@ -88,7 +88,7 @@ int main()
break;
}
case 1 :
case 1:
{
// Print the current server directory
sf::Ftp::DirectoryResponse response = server.getWorkingDirectory();
@ -97,7 +97,7 @@ int main()
break;
}
case 2 :
case 2:
{
// Print the contents of the current server directory
sf::Ftp::ListingResponse response = server.getDirectoryListing();
@ -108,7 +108,7 @@ int main()
break;
}
case 3 :
case 3:
{
// Change the current directory
std::string directory;
@ -118,7 +118,7 @@ int main()
break;
}
case 4 :
case 4:
{
// Create a new directory
std::string directory;
@ -128,7 +128,7 @@ int main()
break;
}
case 5 :
case 5:
{
// Remove an existing directory
std::string directory;
@ -138,7 +138,7 @@ int main()
break;
}
case 6 :
case 6:
{
// Rename a file
std::string source, destination;
@ -150,7 +150,7 @@ int main()
break;
}
case 7 :
case 7:
{
// Remove an existing directory
std::string filename;
@ -160,7 +160,7 @@ int main()
break;
}
case 8 :
case 8:
{
// Download a file from server
std::string filename, directory;
@ -172,7 +172,7 @@ int main()
break;
}
case 9 :
case 9:
{
// Upload a file to server
std::string filename, directory;
@ -184,7 +184,7 @@ int main()
break;
}
case 0 :
case 0:
{
// Disconnect
break;

View file

@ -146,11 +146,11 @@ int main()
sf::Event event;
while (window.pollEvent(event))
{
// Close window : exit
// Close window: exit
if (event.type == sf::Event::Closed)
window.close();
// Escape key : exit
// Escape key: exit
if ((event.type == sf::Event::KeyPressed) && (event.key.code == sf::Keyboard::Escape))
window.close();

View file

@ -14,7 +14,7 @@
////////////////////////////////////////////////////////////
class Effect : public sf::Drawable
{
public :
public:
virtual ~Effect()
{
@ -56,7 +56,7 @@ public :
}
}
protected :
protected:
Effect(const std::string& name) :
m_name(name),
@ -70,14 +70,14 @@ protected :
return *s_font;
}
private :
private:
// Virtual functions to be implemented in derived effects
virtual bool onLoad() = 0;
virtual void onUpdate(float time, float x, float y) = 0;
virtual void onDraw(sf::RenderTarget& target, sf::RenderStates states) const = 0;
private :
private:
std::string m_name;
bool m_isLoaded;

View file

@ -14,7 +14,7 @@ const sf::Font* Effect::s_font = NULL;
////////////////////////////////////////////////////////////
class Pixelate : public Effect
{
public :
public:
Pixelate() :
Effect("pixelate")
@ -60,7 +60,7 @@ private:
////////////////////////////////////////////////////////////
class WaveBlur : public Effect
{
public :
public:
WaveBlur() :
Effect("wave + blur")
@ -124,7 +124,7 @@ private:
////////////////////////////////////////////////////////////
class StormBlink : public Effect
{
public :
public:
StormBlink() :
Effect("storm + blink")
@ -179,7 +179,7 @@ private:
////////////////////////////////////////////////////////////
class Edge : public Effect
{
public :
public:
Edge() :
Effect("edge post-effect")

View file

@ -19,7 +19,7 @@ void playSound()
return;
// Display sound informations
std::cout << "canary.wav :" << std::endl;
std::cout << "canary.wav:" << std::endl;
std::cout << " " << buffer.getDuration().asSeconds() << " seconds" << std::endl;
std::cout << " " << buffer.getSampleRate() << " samples / sec" << std::endl;
std::cout << " " << buffer.getChannelCount() << " channels" << std::endl;
@ -54,7 +54,7 @@ void playMusic()
return;
// Display music informations
std::cout << "orchestral.ogg :" << std::endl;
std::cout << "orchestral.ogg:" << std::endl;
std::cout << " " << music.getDuration().asSeconds() << " seconds" << std::endl;
std::cout << " " << music.getSampleRate() << " samples / sec" << std::endl;
std::cout << " " << music.getChannelCount() << " channels" << std::endl;

View file

@ -45,7 +45,7 @@ int main()
const sf::SoundBuffer& buffer = recorder.getBuffer();
// Display captured sound informations
std::cout << "Sound information :" << std::endl;
std::cout << "Sound information:" << std::endl;
std::cout << " " << buffer.getDuration().asSeconds() << " seconds" << std::endl;
std::cout << " " << buffer.getSampleRate() << " samples / seconds" << std::endl;
std::cout << " " << buffer.getChannelCount() << " channels" << std::endl;
@ -60,7 +60,7 @@ int main()
{
// Choose the filename
std::string filename;
std::cout << "Choose the file to create : ";
std::cout << "Choose the file to create: ";
std::getline(std::cin, filename);
// Save the buffer

View file

@ -17,7 +17,7 @@ const sf::Uint8 endOfStream = 2;
////////////////////////////////////////////////////////////
class NetworkRecorder : public sf::SoundRecorder
{
public :
public:
////////////////////////////////////////////////////////////
/// Constructor
@ -32,7 +32,7 @@ public :
{
}
private :
private:
////////////////////////////////////////////////////////////
/// /see SoundRecorder::OnStart
@ -108,7 +108,7 @@ void doClient(unsigned short port)
sf::IpAddress server;
do
{
std::cout << "Type address or name of the server to connect to : ";
std::cout << "Type address or name of the server to connect to: ";
std::cin >> server;
}
while (server == sf::IpAddress::None);

View file

@ -19,7 +19,7 @@ const sf::Uint8 endOfStream = 2;
////////////////////////////////////////////////////////////
class NetworkAudioStream : public sf::SoundStream
{
public :
public:
////////////////////////////////////////////////////////////
/// Default constructor
@ -64,7 +64,7 @@ public :
}
}
private :
private:
////////////////////////////////////////////////////////////
/// /see SoundStream::OnGetData
@ -72,11 +72,11 @@ private :
////////////////////////////////////////////////////////////
virtual bool onGetData(sf::SoundStream::Chunk& data)
{
// We have reached the end of the buffer and all audio data have been played : we can stop playback
// We have reached the end of the buffer and all audio data have been played: we can stop playback
if ((m_offset >= m_samples.size()) && m_hasFinished)
return false;
// No new data has arrived since last update : wait until we get some
// No new data has arrived since last update: wait until we get some
while ((m_offset >= m_samples.size()) && !m_hasFinished)
sf::sleep(sf::milliseconds(10));
@ -138,7 +138,7 @@ private :
}
else if (id == endOfStream)
{
// End of stream reached : we stop receiving audio data
// End of stream reached: we stop receiving audio data
std::cout << "Audio data has been 100% received!" << std::endl;
m_hasFinished = true;
}

View file

@ -18,14 +18,14 @@ LRESULT CALLBACK onEvent(HWND handle, UINT message, WPARAM wParam, LPARAM lParam
switch (message)
{
// Quit when we close the main window
case WM_CLOSE :
case WM_CLOSE:
{
PostQuitMessage(0);
return 0;
}
// Quit when we click the "quit" button
case WM_COMMAND :
case WM_COMMAND:
{
if (reinterpret_cast<HWND>(lParam) == button)
{
@ -42,7 +42,7 @@ LRESULT CALLBACK onEvent(HWND handle, UINT message, WPARAM wParam, LPARAM lParam
////////////////////////////////////////////////////////////
/// Entry point of application
///
/// \param Instance : Instance of the application
/// \param Instance: Instance of the application
///
/// \return Error code
///

View file

@ -41,7 +41,7 @@ namespace sf
////////////////////////////////////////////////////////////
class SFML_AUDIO_API Listener
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Change the global volume of all the sounds and musics

View file

@ -51,7 +51,7 @@ class InputStream;
////////////////////////////////////////////////////////////
class SFML_AUDIO_API Music : public SoundStream
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Default constructor
@ -136,7 +136,7 @@ public :
////////////////////////////////////////////////////////////
Time getDuration() const;
protected :
protected:
////////////////////////////////////////////////////////////
/// \brief Request a new chunk of audio samples from the stream source
@ -159,7 +159,7 @@ protected :
////////////////////////////////////////////////////////////
virtual void onSeek(Time timeOffset);
private :
private:
////////////////////////////////////////////////////////////
/// \brief Initialize the internal state after loading a new music

View file

@ -44,7 +44,7 @@ class SoundBuffer;
////////////////////////////////////////////////////////////
class SFML_AUDIO_API Sound : public SoundSource
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Default constructor
@ -212,7 +212,7 @@ public :
////////////////////////////////////////////////////////////
void resetBuffer();
private :
private:
////////////////////////////////////////////////////////////
// Member data

View file

@ -51,7 +51,7 @@ class InputStream;
////////////////////////////////////////////////////////////
class SFML_AUDIO_API SoundBuffer
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Default constructor
@ -230,7 +230,7 @@ public :
////////////////////////////////////////////////////////////
SoundBuffer& operator =(const SoundBuffer& right);
private :
private:
friend class Sound;

View file

@ -43,7 +43,7 @@ namespace sf
////////////////////////////////////////////////////////////
class SFML_AUDIO_API SoundBufferRecorder : public SoundRecorder
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Get the sound buffer containing the captured audio data
@ -85,7 +85,7 @@ protected:
////////////////////////////////////////////////////////////
virtual void onStop();
private :
private:
////////////////////////////////////////////////////////////
// Member data

View file

@ -43,7 +43,7 @@ namespace sf
////////////////////////////////////////////////////////////
class SFML_AUDIO_API SoundRecorder
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief destructor
@ -156,7 +156,7 @@ public :
////////////////////////////////////////////////////////////
static bool isAvailable();
protected :
protected:
////////////////////////////////////////////////////////////
/// \brief Default constructor
@ -224,7 +224,7 @@ protected :
////////////////////////////////////////////////////////////
virtual void onStop();
private :
private:
////////////////////////////////////////////////////////////
/// \brief Function called as the entry point of the thread

View file

@ -40,7 +40,7 @@ namespace sf
////////////////////////////////////////////////////////////
class SFML_AUDIO_API SoundSource
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Enumeration of the sound source states
@ -239,7 +239,7 @@ public :
////////////////////////////////////////////////////////////
float getAttenuation() const;
protected :
protected:
////////////////////////////////////////////////////////////
/// \brief Default constructor

View file

@ -44,7 +44,7 @@ namespace sf
////////////////////////////////////////////////////////////
class SFML_AUDIO_API SoundStream : public SoundSource
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Structure defining a chunk of audio data to stream
@ -178,7 +178,7 @@ public :
////////////////////////////////////////////////////////////
bool getLoop() const;
protected :
protected:
////////////////////////////////////////////////////////////
/// \brief Default constructor
@ -234,7 +234,7 @@ protected :
////////////////////////////////////////////////////////////
virtual void onSeek(Time timeOffset) = 0;
private :
private:
////////////////////////////////////////////////////////////
/// \brief Function called as the entry point of the thread
@ -342,7 +342,7 @@ private :
/// \code
/// class CustomStream : public sf::SoundStream
/// {
/// public :
/// public:
///
/// bool open(const std::string& location)
/// {
@ -355,7 +355,7 @@ private :
/// initialize(channelCount, sampleRate);
/// }
///
/// private :
/// private:
///
/// virtual bool onGetData(Chunk& data)
/// {

View file

@ -124,7 +124,7 @@
// For Visual C++ compilers, we also need to turn off this annoying C4251 warning
#ifdef _MSC_VER
#pragma warning(disable : 4251)
#pragma warning(disable: 4251)
#endif

View file

@ -40,7 +40,7 @@ namespace sf
////////////////////////////////////////////////////////////
class SFML_GRAPHICS_API CircleShape : public Shape
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Default constructor
@ -106,7 +106,7 @@ public :
////////////////////////////////////////////////////////////
virtual Vector2f getPoint(unsigned int index) const;
private :
private:
////////////////////////////////////////////////////////////
// Member data

View file

@ -39,7 +39,7 @@ namespace sf
////////////////////////////////////////////////////////////
class SFML_GRAPHICS_API Color
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Default constructor

View file

@ -41,7 +41,7 @@ namespace sf
////////////////////////////////////////////////////////////
class SFML_GRAPHICS_API ConvexShape : public Shape
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Default constructor
@ -107,7 +107,7 @@ public :
////////////////////////////////////////////////////////////
virtual Vector2f getPoint(unsigned int index) const;
private :
private:
////////////////////////////////////////////////////////////
// Member data

View file

@ -43,7 +43,7 @@ class RenderTarget;
////////////////////////////////////////////////////////////
class SFML_GRAPHICS_API Drawable
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Virtual destructor
@ -51,7 +51,7 @@ public :
////////////////////////////////////////////////////////////
virtual ~Drawable() {}
protected :
protected:
friend class RenderTarget;
@ -94,11 +94,11 @@ protected :
/// \code
/// class MyDrawable : public sf::Drawable
/// {
/// public :
/// public:
///
/// ...
///
/// private :
/// private:
///
/// virtual void draw(sf::RenderTarget& target, sf::RenderStates states) const
/// {

View file

@ -49,7 +49,7 @@ class InputStream;
////////////////////////////////////////////////////////////
class SFML_GRAPHICS_API Font
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Holds various information about a font
@ -60,7 +60,7 @@ public :
std::string family; ///< The font family
};
public :
public:
////////////////////////////////////////////////////////////
/// \brief Default constructor
@ -249,7 +249,7 @@ public :
////////////////////////////////////////////////////////////
Font& operator =(const Font& right);
private :
private:
////////////////////////////////////////////////////////////
/// \brief Structure defining a row of glyphs

View file

@ -40,7 +40,7 @@ namespace sf
////////////////////////////////////////////////////////////
class SFML_GRAPHICS_API Glyph
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Default constructor

View file

@ -45,7 +45,7 @@ class InputStream;
////////////////////////////////////////////////////////////
class SFML_GRAPHICS_API Image
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Default constructor
@ -258,7 +258,7 @@ public :
////////////////////////////////////////////////////////////
void flipVertically();
private :
private:
////////////////////////////////////////////////////////////
// Member data

View file

@ -41,7 +41,7 @@ namespace sf
template <typename T>
class Rect
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Default constructor

View file

@ -40,7 +40,7 @@ namespace sf
////////////////////////////////////////////////////////////
class SFML_GRAPHICS_API RectangleShape : public Shape
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Default constructor
@ -94,7 +94,7 @@ public :
////////////////////////////////////////////////////////////
virtual Vector2f getPoint(unsigned int index) const;
private :
private:
////////////////////////////////////////////////////////////
// Member data

View file

@ -44,7 +44,7 @@ class Texture;
////////////////////////////////////////////////////////////
class SFML_GRAPHICS_API RenderStates
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Default constructor

View file

@ -50,7 +50,7 @@ class Drawable;
////////////////////////////////////////////////////////////
class SFML_GRAPHICS_API RenderTarget : NonCopyable
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Destructor
@ -323,7 +323,7 @@ public :
////////////////////////////////////////////////////////////
void resetGLStates();
protected :
protected:
////////////////////////////////////////////////////////////
/// \brief Default constructor

View file

@ -46,7 +46,7 @@ namespace priv
////////////////////////////////////////////////////////////
class SFML_GRAPHICS_API RenderTexture : public RenderTarget
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Default constructor
@ -186,7 +186,7 @@ public :
////////////////////////////////////////////////////////////
const Texture& getTexture() const;
private :
private:
////////////////////////////////////////////////////////////
/// \brief Activate the target for rendering

View file

@ -43,7 +43,7 @@ namespace sf
////////////////////////////////////////////////////////////
class SFML_GRAPHICS_API RenderWindow : public Window, public RenderTarget
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Default constructor
@ -149,7 +149,7 @@ protected:
////////////////////////////////////////////////////////////
virtual void onResize();
private :
private:
////////////////////////////////////////////////////////////
/// \brief Activate the target for rendering

View file

@ -50,7 +50,7 @@ class Texture;
////////////////////////////////////////////////////////////
class SFML_GRAPHICS_API Shader : GlResource, NonCopyable
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Types of shaders
@ -79,7 +79,7 @@ public :
////////////////////////////////////////////////////////////
static CurrentTextureType CurrentTexture;
public :
public:
////////////////////////////////////////////////////////////
/// \brief Default constructor
@ -494,7 +494,7 @@ public :
////////////////////////////////////////////////////////////
static bool isAvailable();
private :
private:
////////////////////////////////////////////////////////////
/// \brief Compile the shader(s) and create the program

View file

@ -43,7 +43,7 @@ namespace sf
////////////////////////////////////////////////////////////
class SFML_GRAPHICS_API Shape : public Drawable, public Transformable
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Virtual destructor
@ -240,7 +240,7 @@ public :
////////////////////////////////////////////////////////////
FloatRect getGlobalBounds() const;
protected :
protected:
////////////////////////////////////////////////////////////
/// \brief Default constructor
@ -258,7 +258,7 @@ protected :
////////////////////////////////////////////////////////////
void update();
private :
private:
////////////////////////////////////////////////////////////
/// \brief Draw the shape to a render target
@ -293,7 +293,7 @@ private :
////////////////////////////////////////////////////////////
void updateOutlineColors();
private :
private:
////////////////////////////////////////////////////////////
// Member data

View file

@ -46,7 +46,7 @@ class Texture;
////////////////////////////////////////////////////////////
class SFML_GRAPHICS_API Sprite : public Drawable, public Transformable
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Default constructor
@ -189,7 +189,7 @@ public :
////////////////////////////////////////////////////////////
FloatRect getGlobalBounds() const;
private :
private:
////////////////////////////////////////////////////////////
/// \brief Draw the sprite to a render target

View file

@ -47,7 +47,7 @@ namespace sf
////////////////////////////////////////////////////////////
class SFML_GRAPHICS_API Text : public Drawable, public Transformable
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Enumeration of the string drawing styles
@ -278,7 +278,7 @@ public :
////////////////////////////////////////////////////////////
FloatRect getGlobalBounds() const;
private :
private:
////////////////////////////////////////////////////////////
/// \brief Draw the text to a render target

View file

@ -46,7 +46,7 @@ class InputStream;
////////////////////////////////////////////////////////////
class SFML_GRAPHICS_API Texture : GlResource
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Types of texture coordinates that can be used for rendering
@ -58,7 +58,7 @@ public :
Pixels ///< Texture coordinates in range [0 .. size]
};
public :
public:
////////////////////////////////////////////////////////////
/// \brief Default constructor
@ -468,7 +468,7 @@ public :
////////////////////////////////////////////////////////////
static unsigned int getMaximumSize();
private :
private:
friend class RenderTexture;
friend class RenderTarget;

View file

@ -41,7 +41,7 @@ namespace sf
////////////////////////////////////////////////////////////
class SFML_GRAPHICS_API Transform
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Default constructor

View file

@ -40,7 +40,7 @@ namespace sf
////////////////////////////////////////////////////////////
class SFML_GRAPHICS_API Transformable
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Default constructor
@ -311,7 +311,7 @@ public :
////////////////////////////////////////////////////////////
const Transform& getInverseTransform() const;
private :
private:
////////////////////////////////////////////////////////////
// Member data
@ -396,7 +396,7 @@ private :
/// \code
/// class MyEntity
/// {
/// public :
/// public:
/// void SetPosition(const MyVector& v)
/// {
/// myTransform.setPosition(v.x(), v.y());
@ -407,7 +407,7 @@ private :
/// target.draw(..., myTransform.getTransform());
/// }
///
/// private :
/// private:
/// sf::Transformable myTransform;
/// };
/// \endcode

View file

@ -41,7 +41,7 @@ namespace sf
////////////////////////////////////////////////////////////
class SFML_GRAPHICS_API Vertex
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Default constructor

View file

@ -44,7 +44,7 @@ namespace sf
////////////////////////////////////////////////////////////
class SFML_GRAPHICS_API VertexArray : public Drawable
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Default constructor
@ -171,7 +171,7 @@ public :
////////////////////////////////////////////////////////////
FloatRect getBounds() const;
private :
private:
////////////////////////////////////////////////////////////
/// \brief Draw the vertex array to a render target

View file

@ -42,7 +42,7 @@ namespace sf
////////////////////////////////////////////////////////////
class SFML_GRAPHICS_API View
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Default constructor
@ -264,7 +264,7 @@ public :
////////////////////////////////////////////////////////////
const Transform& getInverseTransform() const;
private :
private:
////////////////////////////////////////////////////////////
// Member data

View file

@ -46,7 +46,7 @@ class IpAddress;
////////////////////////////////////////////////////////////
class SFML_NETWORK_API Ftp : NonCopyable
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Enumeration of transfer modes
@ -65,7 +65,7 @@ public :
////////////////////////////////////////////////////////////
class SFML_NETWORK_API Response
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Status codes possibly returned by a FTP response
@ -172,7 +172,7 @@ public :
////////////////////////////////////////////////////////////
const std::string& getMessage() const;
private :
private:
////////////////////////////////////////////////////////////
// Member data
@ -187,7 +187,7 @@ public :
////////////////////////////////////////////////////////////
class SFML_NETWORK_API DirectoryResponse : public Response
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Default constructor
@ -205,7 +205,7 @@ public :
////////////////////////////////////////////////////////////
const std::string& getDirectory() const;
private :
private:
////////////////////////////////////////////////////////////
// Member data
@ -220,7 +220,7 @@ public :
////////////////////////////////////////////////////////////
class SFML_NETWORK_API ListingResponse : public Response
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Default constructor
@ -239,7 +239,7 @@ public :
////////////////////////////////////////////////////////////
const std::vector<std::string>& getListing() const;
private :
private:
////////////////////////////////////////////////////////////
// Member data

View file

@ -45,7 +45,7 @@ namespace sf
////////////////////////////////////////////////////////////
class SFML_NETWORK_API Http : NonCopyable
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Define a HTTP request
@ -53,7 +53,7 @@ public :
////////////////////////////////////////////////////////////
class SFML_NETWORK_API Request
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Enumerate the available HTTP methods for a request
@ -143,7 +143,7 @@ public :
////////////////////////////////////////////////////////////
void setBody(const std::string& body);
private :
private:
friend class Http;
@ -192,7 +192,7 @@ public :
////////////////////////////////////////////////////////////
class SFML_NETWORK_API Response
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Enumerate all the valid status codes for a response
@ -303,7 +303,7 @@ public :
////////////////////////////////////////////////////////////
const std::string& getBody() const;
private :
private:
friend class Http;
@ -404,7 +404,7 @@ public :
////////////////////////////////////////////////////////////
Response sendRequest(const Request& request, Time timeout = Time::Zero);
private :
private:
////////////////////////////////////////////////////////////
// Member data

View file

@ -43,7 +43,7 @@ namespace sf
////////////////////////////////////////////////////////////
class SFML_NETWORK_API IpAddress
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Default constructor
@ -185,7 +185,7 @@ public :
static const IpAddress LocalHost; ///< The "localhost" address (for connecting a computer to itself locally)
static const IpAddress Broadcast; ///< The "broadcast" address (for sending UDP messages to everyone on a local network)
private :
private:
////////////////////////////////////////////////////////////
// Member data

View file

@ -49,7 +49,7 @@ class SFML_NETWORK_API Packet
// A bool-like type that cannot be converted to integer or pointer types
typedef bool (Packet::*BoolType)(std::size_t);
public :
public:
////////////////////////////////////////////////////////////
/// \brief Default constructor
@ -252,7 +252,7 @@ protected:
////////////////////////////////////////////////////////////
virtual void onReceive(const void* data, std::size_t size);
private :
private:
////////////////////////////////////////////////////////////
/// Disallow comparisons between packets

View file

@ -44,7 +44,7 @@ class SocketSelector;
////////////////////////////////////////////////////////////
class SFML_NETWORK_API Socket : NonCopyable
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Status codes that may be returned by socket functions
@ -67,7 +67,7 @@ public :
AnyPort = 0 ///< Special value that tells the system to pick any available port
};
public :
public:
////////////////////////////////////////////////////////////
/// \brief Destructor
@ -104,7 +104,7 @@ public :
////////////////////////////////////////////////////////////
bool isBlocking() const;
protected :
protected:
////////////////////////////////////////////////////////////
/// \brief Types of protocols that the socket can use
@ -165,7 +165,7 @@ protected :
////////////////////////////////////////////////////////////
void close();
private :
private:
friend class SocketSelector;

View file

@ -42,7 +42,7 @@ class Socket;
////////////////////////////////////////////////////////////
class SFML_NETWORK_API SocketSelector
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Default constructor
@ -151,7 +151,7 @@ public :
////////////////////////////////////////////////////////////
SocketSelector& operator =(const SocketSelector& right);
private :
private:
struct SocketSelectorImpl;

View file

@ -42,7 +42,7 @@ class TcpSocket;
////////////////////////////////////////////////////////////
class SFML_NETWORK_API TcpListener : public Socket
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Default constructor

View file

@ -45,7 +45,7 @@ class Packet;
////////////////////////////////////////////////////////////
class SFML_NETWORK_API TcpSocket : public Socket
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Default constructor

View file

@ -44,7 +44,7 @@ class Packet;
////////////////////////////////////////////////////////////
class SFML_NETWORK_API UdpSocket : public Socket
{
public :
public:
////////////////////////////////////////////////////////////
// Constants

View file

@ -40,7 +40,7 @@ namespace sf
////////////////////////////////////////////////////////////
class SFML_SYSTEM_API Clock
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Default constructor
@ -73,7 +73,7 @@ public :
////////////////////////////////////////////////////////////
Time restart();
private :
private:
////////////////////////////////////////////////////////////
// Member data

View file

@ -39,7 +39,7 @@ namespace sf
////////////////////////////////////////////////////////////
class InputStream
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Virtual destructor
@ -114,7 +114,7 @@ public :
/// // custom stream class that reads from inside a zip file
/// class ZipStream : public sf::InputStream
/// {
/// public :
/// public:
///
/// ZipStream(std::string archive);
///
@ -128,7 +128,7 @@ public :
///
/// Int64 getSize();
///
/// private :
/// private:
///
/// ...
/// };

View file

@ -42,7 +42,7 @@ class Mutex;
////////////////////////////////////////////////////////////
class SFML_SYSTEM_API Lock : NonCopyable
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Construct the lock with a target mutex
@ -62,7 +62,7 @@ public :
////////////////////////////////////////////////////////////
~Lock();
private :
private:
////////////////////////////////////////////////////////////
// Member data

View file

@ -46,7 +46,7 @@ namespace priv
////////////////////////////////////////////////////////////
class SFML_SYSTEM_API Mutex : NonCopyable
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Default constructor
@ -80,7 +80,7 @@ public :
////////////////////////////////////////////////////////////
void unlock();
private :
private:
////////////////////////////////////////////////////////////
// Member data

View file

@ -40,7 +40,7 @@ namespace sf
////////////////////////////////////////////////////////////
class SFML_SYSTEM_API NonCopyable
{
protected :
protected:
////////////////////////////////////////////////////////////
/// \brief Default constructor
@ -52,7 +52,7 @@ protected :
////////////////////////////////////////////////////////////
NonCopyable() {}
private :
private:
////////////////////////////////////////////////////////////
/// \brief Disabled copy constructor

View file

@ -43,7 +43,7 @@ namespace sf
////////////////////////////////////////////////////////////
class SFML_SYSTEM_API String
{
public :
public:
////////////////////////////////////////////////////////////
// Types
@ -515,7 +515,7 @@ public :
////////////////////////////////////////////////////////////
ConstIterator end() const;
private :
private:
friend SFML_SYSTEM_API bool operator ==(const String& left, const String& right);
friend SFML_SYSTEM_API bool operator <(const String& left, const String& right);

View file

@ -47,7 +47,7 @@ namespace priv
////////////////////////////////////////////////////////////
class SFML_SYSTEM_API Thread : NonCopyable
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Construct the thread from a functor with no argument
@ -111,7 +111,7 @@ public :
/// \code
/// class MyClass
/// {
/// public :
/// public:
///
/// void function();
/// };
@ -171,7 +171,7 @@ public :
////////////////////////////////////////////////////////////
void terminate();
private :
private:
friend class priv::ThreadImpl;
@ -244,7 +244,7 @@ private :
///
/// class Task
/// {
/// public :
/// public:
/// void run()
/// {
/// ...

View file

@ -46,7 +46,7 @@ namespace priv
////////////////////////////////////////////////////////////
class SFML_SYSTEM_API ThreadLocal : NonCopyable
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Default constructor
@ -78,7 +78,7 @@ public :
////////////////////////////////////////////////////////////
void* getValue() const;
private :
private:
////////////////////////////////////////////////////////////
// Member data

View file

@ -40,7 +40,7 @@ namespace sf
template <typename T>
class ThreadLocalPtr : private ThreadLocal
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Default constructor

View file

@ -39,7 +39,7 @@ namespace sf
////////////////////////////////////////////////////////////
class SFML_SYSTEM_API Time
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Default constructor
@ -84,7 +84,7 @@ public :
////////////////////////////////////////////////////////////
static const Time Zero; ///< Predefined "zero" time value
private :
private:
friend SFML_SYSTEM_API Time seconds(float);
friend SFML_SYSTEM_API Time milliseconds(Int32);
@ -101,7 +101,7 @@ private :
////////////////////////////////////////////////////////////
explicit Time(Int64 microseconds);
private :
private:
////////////////////////////////////////////////////////////
// Member data

View file

@ -47,7 +47,7 @@ class Utf;
template <>
class Utf<8>
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Decode a single UTF-8 character
@ -254,7 +254,7 @@ public :
template <>
class Utf<16>
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Decode a single UTF-16 character
@ -461,7 +461,7 @@ public :
template <>
class Utf<32>
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Decode a single UTF-32 character

View file

@ -24,7 +24,7 @@
////////////////////////////////////////////////////////////
// References :
// References:
//
// http://www.unicode.org/
// http://www.unicode.org/Public/PROGRAMS/CVTUTF/ConvertUTF.c
@ -62,12 +62,12 @@ In Utf<8>::decode(In begin, In end, Uint32& output, Uint32 replacement)
output = 0;
switch (trailingBytes)
{
case 5 : output += static_cast<Uint8>(*begin++); output <<= 6;
case 4 : output += static_cast<Uint8>(*begin++); output <<= 6;
case 3 : output += static_cast<Uint8>(*begin++); output <<= 6;
case 2 : output += static_cast<Uint8>(*begin++); output <<= 6;
case 1 : output += static_cast<Uint8>(*begin++); output <<= 6;
case 0 : output += static_cast<Uint8>(*begin++);
case 5: output += static_cast<Uint8>(*begin++); output <<= 6;
case 4: output += static_cast<Uint8>(*begin++); output <<= 6;
case 3: output += static_cast<Uint8>(*begin++); output <<= 6;
case 2: output += static_cast<Uint8>(*begin++); output <<= 6;
case 1: output += static_cast<Uint8>(*begin++); output <<= 6;
case 0: output += static_cast<Uint8>(*begin++);
}
output -= offsets[trailingBytes];
}
@ -114,10 +114,10 @@ Out Utf<8>::encode(Uint32 input, Out output, Uint8 replacement)
Uint8 bytes[4];
switch (bytestoWrite)
{
case 4 : bytes[3] = static_cast<Uint8>((input | 0x80) & 0xBF); input >>= 6;
case 3 : bytes[2] = static_cast<Uint8>((input | 0x80) & 0xBF); input >>= 6;
case 2 : bytes[1] = static_cast<Uint8>((input | 0x80) & 0xBF); input >>= 6;
case 1 : bytes[0] = static_cast<Uint8> (input | firstBytes[bytestoWrite]);
case 4: bytes[3] = static_cast<Uint8>((input | 0x80) & 0xBF); input >>= 6;
case 3: bytes[2] = static_cast<Uint8>((input | 0x80) & 0xBF); input >>= 6;
case 2: bytes[1] = static_cast<Uint8>((input | 0x80) & 0xBF); input >>= 6;
case 1: bytes[0] = static_cast<Uint8> (input | firstBytes[bytestoWrite]);
}
// Add them to the output

View file

@ -36,7 +36,7 @@ namespace sf
template <typename T>
class Vector2
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Default constructor

View file

@ -36,7 +36,7 @@ namespace sf
template <typename T>
class Vector3
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Default constructor

View file

@ -47,7 +47,7 @@ namespace priv
////////////////////////////////////////////////////////////
class SFML_WINDOW_API Context : GlResource, NonCopyable
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Default constructor
@ -75,7 +75,7 @@ public :
////////////////////////////////////////////////////////////
bool setActive(bool active);
public :
public:
////////////////////////////////////////////////////////////
/// \brief Construct a in-memory context
@ -90,7 +90,7 @@ public :
////////////////////////////////////////////////////////////
Context(const ContextSettings& settings, unsigned int width, unsigned int height);
private :
private:
////////////////////////////////////////////////////////////
// Member data

View file

@ -43,7 +43,7 @@ namespace sf
////////////////////////////////////////////////////////////
class Event
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Size events parameters (Resized)

View file

@ -39,7 +39,7 @@ namespace sf
////////////////////////////////////////////////////////////
class SFML_WINDOW_API GlResource
{
protected :
protected:
////////////////////////////////////////////////////////////
/// \brief Default constructor

View file

@ -40,7 +40,7 @@ namespace sf
////////////////////////////////////////////////////////////
class SFML_WINDOW_API Joystick
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Constants related to joysticks capabilities

View file

@ -39,7 +39,7 @@ namespace sf
////////////////////////////////////////////////////////////
class SFML_WINDOW_API Keyboard
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Key codes

View file

@ -42,7 +42,7 @@ class Window;
////////////////////////////////////////////////////////////
class SFML_WINDOW_API Mouse
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Mouse buttons

View file

@ -41,7 +41,7 @@ namespace sf
////////////////////////////////////////////////////////////
class SFML_WINDOW_API Sensor
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Sensor type

View file

@ -42,7 +42,7 @@ class Window;
////////////////////////////////////////////////////////////
class SFML_WINDOW_API Touch
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Check if a touch event is currently down

View file

@ -40,7 +40,7 @@ namespace sf
////////////////////////////////////////////////////////////
class SFML_WINDOW_API VideoMode
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Default constructor

View file

@ -56,7 +56,7 @@ class Event;
////////////////////////////////////////////////////////////
class SFML_WINDOW_API Window : GlResource, NonCopyable
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Default constructor
@ -437,7 +437,7 @@ public :
////////////////////////////////////////////////////////////
WindowHandle getSystemHandle() const;
protected :
protected:
////////////////////////////////////////////////////////////
/// \brief Function called after the window has been created

View file

@ -47,35 +47,35 @@ void alCheckError(const std::string& file, unsigned int line)
// Decode the error code
switch (errorCode)
{
case AL_INVALID_NAME :
case AL_INVALID_NAME:
{
error = "AL_INVALID_NAME";
description = "an unacceptable name has been specified";
break;
}
case AL_INVALID_ENUM :
case AL_INVALID_ENUM:
{
error = "AL_INVALID_ENUM";
description = "an unacceptable value has been specified for an enumerated argument";
break;
}
case AL_INVALID_VALUE :
case AL_INVALID_VALUE:
{
error = "AL_INVALID_VALUE";
description = "a numeric argument is out of range";
break;
}
case AL_INVALID_OPERATION :
case AL_INVALID_OPERATION:
{
error = "AL_INVALID_OPERATION";
description = "the specified operation is not allowed in the current state";
break;
}
case AL_OUT_OF_MEMORY :
case AL_OUT_OF_MEMORY:
{
error = "AL_OUT_OF_MEMORY";
description = "there is not enough memory left to execute the command";

View file

@ -104,13 +104,13 @@ int AudioDevice::getFormatFromChannelCount(unsigned int channelCount)
int format = 0;
switch (channelCount)
{
case 1 : format = AL_FORMAT_MONO16; break;
case 2 : format = AL_FORMAT_STEREO16; break;
case 4 : format = alGetEnumValue("AL_FORMAT_QUAD16"); break;
case 6 : format = alGetEnumValue("AL_FORMAT_51CHN16"); break;
case 7 : format = alGetEnumValue("AL_FORMAT_61CHN16"); break;
case 8 : format = alGetEnumValue("AL_FORMAT_71CHN16"); break;
default : format = 0; break;
case 1: format = AL_FORMAT_MONO16; break;
case 2: format = AL_FORMAT_STEREO16; break;
case 4: format = alGetEnumValue("AL_FORMAT_QUAD16"); break;
case 6: format = alGetEnumValue("AL_FORMAT_51CHN16"); break;
case 7: format = alGetEnumValue("AL_FORMAT_61CHN16"); break;
case 8: format = alGetEnumValue("AL_FORMAT_71CHN16"); break;
default: format = 0; break;
}
// Fixes a bug on OS X

View file

@ -44,7 +44,7 @@ namespace priv
////////////////////////////////////////////////////////////
class AudioDevice
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Default constructor

View file

@ -223,7 +223,7 @@ bool SoundFile::openWrite(const std::string& filename, unsigned int channelCount
int format = getFormatFromFilename(filename);
if (format == -1)
{
// Error : unrecognized extension
// Error: unrecognized extension
err() << "Failed to create sound file \"" << filename << "\" (unknown format)" << std::endl;
return false;
}
@ -375,10 +375,10 @@ sf_count_t SoundFile::Memory::seek(sf_count_t offset, int whence, void* user)
sf_count_t position = 0;
switch (whence)
{
case SEEK_SET : position = offset; break;
case SEEK_CUR : position = memory->current - memory->begin + offset; break;
case SEEK_END : position = memory->size - offset; break;
default : position = 0; break;
case SEEK_SET: position = offset; break;
case SEEK_CUR: position = memory->current - memory->begin + offset; break;
case SEEK_END: position = memory->size - offset; break;
default: position = 0; break;
}
if (position >= memory->size)
@ -431,10 +431,10 @@ sf_count_t SoundFile::Stream::seek(sf_count_t offset, int whence, void* userData
Stream* stream = static_cast<Stream*>(userData);
switch (whence)
{
case SEEK_SET : return stream->source->seek(offset);
case SEEK_CUR : return stream->source->seek(stream->source->tell() + offset);
case SEEK_END : return stream->source->seek(stream->size - offset);
default : return stream->source->seek(0);
case SEEK_SET: return stream->source->seek(offset);
case SEEK_CUR: return stream->source->seek(stream->source->tell() + offset);
case SEEK_END: return stream->source->seek(stream->size - offset);
default: return stream->source->seek(0);
}
}

View file

@ -46,7 +46,7 @@ namespace priv
////////////////////////////////////////////////////////////
class SoundFile : NonCopyable
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Default constructor
@ -155,7 +155,7 @@ public :
////////////////////////////////////////////////////////////
void seek(Time timeOffset);
private :
private:
////////////////////////////////////////////////////////////
/// \brief Initialize the internal state of the sound file

View file

@ -33,7 +33,7 @@
#include <cstring>
#ifdef _MSC_VER
#pragma warning(disable : 4355) // 'this' used in base member initializer list
#pragma warning(disable: 4355) // 'this' used in base member initializer list
#endif
@ -71,7 +71,7 @@ bool SoundRecorder::start(unsigned int sampleRate)
// Check if the device can do audio capture
if (!isAvailable())
{
err() << "Failed to start capture : your system cannot capture audio data (call SoundRecorder::isAvailable to check it)" << std::endl;
err() << "Failed to start capture: your system cannot capture audio data (call SoundRecorder::isAvailable to check it)" << std::endl;
return false;
}
@ -245,7 +245,7 @@ void SoundRecorder::record()
sleep(m_processingInterval);
}
// Capture is finished : clean up everything
// Capture is finished: clean up everything
cleanup();
}

View file

@ -182,10 +182,10 @@ SoundSource::Status SoundSource::getStatus() const
switch (status)
{
case AL_INITIAL :
case AL_STOPPED : return Stopped;
case AL_PAUSED : return Paused;
case AL_PLAYING : return Playing;
case AL_INITIAL:
case AL_STOPPED: return Stopped;
case AL_PAUSED: return Paused;
case AL_PLAYING: return Playing;
}
return Stopped;

View file

@ -33,7 +33,7 @@
#include <SFML/System/Lock.hpp>
#ifdef _MSC_VER
#pragma warning(disable : 4355) // 'this' used in base member initializer list
#pragma warning(disable: 4355) // 'this' used in base member initializer list
#endif

View file

@ -48,49 +48,49 @@ void glCheckError(const char* file, unsigned int line)
// Decode the error code
switch (errorCode)
{
case GL_INVALID_ENUM :
case GL_INVALID_ENUM:
{
error = "GL_INVALID_ENUM";
description = "an unacceptable value has been specified for an enumerated argument";
break;
}
case GL_INVALID_VALUE :
case GL_INVALID_VALUE:
{
error = "GL_INVALID_VALUE";
description = "a numeric argument is out of range";
break;
}
case GL_INVALID_OPERATION :
case GL_INVALID_OPERATION:
{
error = "GL_INVALID_OPERATION";
description = "the specified operation is not allowed in the current state";
break;
}
case GL_STACK_OVERFLOW :
case GL_STACK_OVERFLOW:
{
error = "GL_STACK_OVERFLOW";
description = "this command would cause a stack overflow";
break;
}
case GL_STACK_UNDERFLOW :
case GL_STACK_UNDERFLOW:
{
error = "GL_STACK_UNDERFLOW";
description = "this command would cause a stack underflow";
break;
}
case GL_OUT_OF_MEMORY :
case GL_OUT_OF_MEMORY:
{
error = "GL_OUT_OF_MEMORY";
description = "there is not enough memory left to execute the command";
break;
}
case GLEXT_GL_INVALID_FRAMEBUFFER_OPERATION :
case GLEXT_GL_INVALID_FRAMEBUFFER_OPERATION:
{
error = "GL_INVALID_FRAMEBUFFER_OPERATION";
description = "the object bound to FRAMEBUFFER_BINDING is not \"framebuffer complete\"";

View file

@ -123,7 +123,7 @@ bool ImageLoader::loadImageFromFile(const std::string& filename, std::vector<Uin
else
{
// Error, failed to load the image
err() << "Failed to load image \"" << filename << "\". Reason : " << stbi_failure_reason() << std::endl;
err() << "Failed to load image \"" << filename << "\". Reason: " << stbi_failure_reason() << std::endl;
return false;
}
@ -162,7 +162,7 @@ bool ImageLoader::loadImageFromMemory(const void* data, std::size_t dataSize, st
else
{
// Error, failed to load the image
err() << "Failed to load image from memory. Reason : " << stbi_failure_reason() << std::endl;
err() << "Failed to load image from memory. Reason: " << stbi_failure_reason() << std::endl;
return false;
}
@ -212,7 +212,7 @@ bool ImageLoader::loadImageFromStream(InputStream& stream, std::vector<Uint8>& p
else
{
// Error, failed to load the image
err() << "Failed to load image from stream. Reason : " << stbi_failure_reason() << std::endl;
err() << "Failed to load image from stream. Reason: " << stbi_failure_reason() << std::endl;
return false;
}

View file

@ -46,7 +46,7 @@ namespace priv
////////////////////////////////////////////////////////////
class ImageLoader : NonCopyable
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Get the unique instance of the class
@ -105,7 +105,7 @@ public :
////////////////////////////////////////////////////////////
bool saveImageToFile(const std::string& filename, const std::vector<Uint8>& pixels, const Vector2u& size);
private :
private:
////////////////////////////////////////////////////////////
/// \brief Default constructor

View file

@ -41,7 +41,7 @@ namespace priv
////////////////////////////////////////////////////////////
class RenderTextureImpl : NonCopyable
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Destructor

View file

@ -44,7 +44,7 @@ namespace priv
////////////////////////////////////////////////////////////
class RenderTextureImplDefault : public RenderTextureImpl, GlResource
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Default constructor
@ -58,7 +58,7 @@ public :
////////////////////////////////////////////////////////////
~RenderTextureImplDefault();
private :
private:
////////////////////////////////////////////////////////////
/// \brief Create the render texture implementation

View file

@ -44,7 +44,7 @@ namespace priv
////////////////////////////////////////////////////////////
class RenderTextureImplFBO : public RenderTextureImpl, GlResource
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Default constructor
@ -66,7 +66,7 @@ public :
////////////////////////////////////////////////////////////
static bool isAvailable();
private :
private:
////////////////////////////////////////////////////////////
/// \brief Create the render texture implementation

View file

@ -190,9 +190,9 @@ Vector2f Text::findCharacterPos(std::size_t index) const
// Handle special characters
switch (curChar)
{
case ' ' : position.x += hspace; continue;
case '\t' : position.x += hspace * 4; continue;
case '\n' : position.y += vspace; position.x = 0; continue;
case ' ': position.x += hspace; continue;
case '\t': position.x += hspace * 4; continue;
case '\n': position.y += vspace; position.x = 0; continue;
}
// For regular characters, add the advance offset of the glyph
@ -329,9 +329,9 @@ void Text::ensureGeometryUpdate() const
switch (curChar)
{
case ' ' : x += hspace; break;
case '\t' : x += hspace * 4; break;
case '\n' : y += vspace; x = 0; break;
case ' ': x += hspace; break;
case '\t': x += hspace * 4; break;
case '\n': y += vspace; x = 0; break;
}
// Update the current bounds (max coordinates)

View file

@ -41,7 +41,7 @@ namespace priv
////////////////////////////////////////////////////////////
class TextureSaver
{
public :
public:
////////////////////////////////////////////////////////////
/// \brief Default constructor
@ -59,7 +59,7 @@ public :
////////////////////////////////////////////////////////////
~TextureSaver();
private :
private:
////////////////////////////////////////////////////////////
// Member data

View file

@ -41,7 +41,7 @@ namespace sf
////////////////////////////////////////////////////////////
class Ftp::DataChannel : NonCopyable
{
public :
public:
////////////////////////////////////////////////////////////
DataChannel(Ftp& owner);
@ -55,7 +55,7 @@ public :
////////////////////////////////////////////////////////////
void receive(std::ostream& stream);
private :
private:
////////////////////////////////////////////////////////////
// Member data
@ -499,7 +499,7 @@ Ftp::Response Ftp::getResponse()
}
else
{
// Error : cannot extract the code, and we are not in a multiline response
// Error: cannot extract the code, and we are not in a multiline response
return Response(Response::InvalidResponse);
}
}
@ -558,9 +558,9 @@ Ftp::Response Ftp::DataChannel::open(Ftp::TransferMode mode)
std::string modeStr;
switch (mode)
{
case Ftp::Binary : modeStr = "I"; break;
case Ftp::Ascii : modeStr = "A"; break;
case Ftp::Ebcdic : modeStr = "E"; break;
case Ftp::Binary: modeStr = "I"; break;
case Ftp::Ascii: modeStr = "A"; break;
case Ftp::Ebcdic: modeStr = "E"; break;
}
// Set the transfer mode

View file

@ -107,12 +107,12 @@ std::string Http::Request::prepare() const
std::string method;
switch (m_method)
{
default :
case Get : method = "GET"; break;
case Post : method = "POST"; break;
case Head : method = "HEAD"; break;
case Put : method = "PUT"; break;
case Delete : method = "DELETE"; break;
default:
case Get: method = "GET"; break;
case Post: method = "POST"; break;
case Head: method = "HEAD"; break;
case Put: method = "PUT"; break;
case Delete: method = "DELETE"; break;
}
// Write the first line containing the request type

View file

@ -33,7 +33,7 @@
#include <utility>
#ifdef _MSC_VER
#pragma warning(disable : 4127) // "conditional expression is constant" generated by the FD_SET macro
#pragma warning(disable: 4127) // "conditional expression is constant" generated by the FD_SET macro
#endif

Some files were not shown because too many files have changed in this diff Show more