From b7b876eb265520e10121ea3574242f7fcee1e7fc Mon Sep 17 00:00:00 2001 From: LaurentGom Date: Wed, 10 Feb 2010 11:09:55 +0000 Subject: [PATCH] Removed all the useless "sf::" git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1397 4e206d99-4929-0410-ac5d-dfc041789085 --- include/SFML/Graphics/Drawable.hpp | 4 ++-- include/SFML/Graphics/RenderTarget.hpp | 4 ++-- include/SFML/Graphics/Shape.hpp | 12 ++++++------ include/SFML/System/Utf.hpp | 2 +- src/SFML/Audio/Music.cpp | 4 ++-- src/SFML/Graphics/Drawable.cpp | 4 ++-- src/SFML/Graphics/Font.cpp | 2 +- src/SFML/Graphics/RenderTarget.cpp | 4 ++-- src/SFML/Graphics/RenderWindow.cpp | 4 ++-- src/SFML/Graphics/Text.cpp | 2 +- src/SFML/Network/Ftp.cpp | 16 ++++++++-------- src/SFML/Network/Http.cpp | 4 ++-- src/SFML/System/Clock.cpp | 4 ++-- 13 files changed, 33 insertions(+), 33 deletions(-) diff --git a/include/SFML/Graphics/Drawable.hpp b/include/SFML/Graphics/Drawable.hpp index 210c7e2d..63fcfec5 100644 --- a/include/SFML/Graphics/Drawable.hpp +++ b/include/SFML/Graphics/Drawable.hpp @@ -290,7 +290,7 @@ public : /// \return Transformed point /// //////////////////////////////////////////////////////////// - sf::Vector2f TransformToLocal(const sf::Vector2f& point) const; + Vector2f TransformToLocal(const Vector2f& point) const; //////////////////////////////////////////////////////////// /// Transform a point from local coordinates into global coordinates @@ -301,7 +301,7 @@ public : /// \return Transformed point /// //////////////////////////////////////////////////////////// - sf::Vector2f TransformToGlobal(const sf::Vector2f& point) const; + Vector2f TransformToGlobal(const Vector2f& point) const; protected : diff --git a/include/SFML/Graphics/RenderTarget.hpp b/include/SFML/Graphics/RenderTarget.hpp index cabb8def..bb938629 100644 --- a/include/SFML/Graphics/RenderTarget.hpp +++ b/include/SFML/Graphics/RenderTarget.hpp @@ -137,7 +137,7 @@ public : /// \return Converted point /// //////////////////////////////////////////////////////////// - sf::Vector2f ConvertCoords(unsigned int x, unsigned int y) const; + Vector2f ConvertCoords(unsigned int x, unsigned int y) const; //////////////////////////////////////////////////////////// /// Convert a point in target coordinates into view coordinates @@ -150,7 +150,7 @@ public : /// \return Converted point /// //////////////////////////////////////////////////////////// - sf::Vector2f ConvertCoords(unsigned int x, unsigned int y, const View& view) const; + Vector2f ConvertCoords(unsigned int x, unsigned int y, const View& view) const; //////////////////////////////////////////////////////////// /// Save the current OpenGL render states and matrices diff --git a/include/SFML/Graphics/Shape.hpp b/include/SFML/Graphics/Shape.hpp index f93d31bd..8023a215 100644 --- a/include/SFML/Graphics/Shape.hpp +++ b/include/SFML/Graphics/Shape.hpp @@ -190,7 +190,7 @@ public : /// \param outlineColor : Color used to draw the outline /// //////////////////////////////////////////////////////////// - static Shape Line(float p1x, float p1y, float p2x, float p2y, float thickness, const Color& color, float outline = 0.f, const Color& outlineColor = sf::Color(0, 0, 0)); + static Shape Line(float p1x, float p1y, float p2x, float p2y, float thickness, const Color& color, float outline = 0.f, const Color& outlineColor = Color(0, 0, 0)); //////////////////////////////////////////////////////////// /// Create a shape made of a single line (use vectors) @@ -203,7 +203,7 @@ public : /// \param outlineColor : Color used to draw the outline /// //////////////////////////////////////////////////////////// - static Shape Line(const Vector2f& p1, const Vector2f& p2, float thickness, const Color& color, float outline = 0.f, const Color& outlineColor = sf::Color(0, 0, 0)); + static Shape Line(const Vector2f& p1, const Vector2f& p2, float thickness, const Color& color, float outline = 0.f, const Color& outlineColor = Color(0, 0, 0)); //////////////////////////////////////////////////////////// /// Create a shape made of a single rectangle (use floats) @@ -215,7 +215,7 @@ public : /// \param outlineColor : Color used to draw the outline /// //////////////////////////////////////////////////////////// - static Shape Rectangle(float p1x, float p1y, float p2x, float p2y, const Color& color, float outline = 0.f, const Color& outlineColor = sf::Color(0, 0, 0)); + static Shape Rectangle(float p1x, float p1y, float p2x, float p2y, const Color& color, float outline = 0.f, const Color& outlineColor = Color(0, 0, 0)); //////////////////////////////////////////////////////////// /// Create a shape made of a single rectangle (use vectors) @@ -227,7 +227,7 @@ public : /// \param outlineColor : Color used to draw the outline /// //////////////////////////////////////////////////////////// - static Shape Rectangle(const Vector2f& p1, const Vector2f& p2, const Color& color, float outline = 0.f, const Color& outlineColor = sf::Color(0, 0, 0)); + static Shape Rectangle(const Vector2f& p1, const Vector2f& p2, const Color& color, float outline = 0.f, const Color& outlineColor = Color(0, 0, 0)); //////////////////////////////////////////////////////////// /// Create a shape made of a single circle (use floats) @@ -239,7 +239,7 @@ public : /// \param outlineColor : Color used to draw the outline /// //////////////////////////////////////////////////////////// - static Shape Circle(float x, float y, float radius, const Color& color, float outline = 0.f, const Color& outlineColor = sf::Color(0, 0, 0)); + static Shape Circle(float x, float y, float radius, const Color& color, float outline = 0.f, const Color& outlineColor = Color(0, 0, 0)); //////////////////////////////////////////////////////////// /// Create a shape made of a single circle (use vectors) @@ -251,7 +251,7 @@ public : /// \param outlineColor : Color used to draw the outline /// //////////////////////////////////////////////////////////// - static Shape Circle(const Vector2f& center, float radius, const Color& color, float outline = 0.f, const Color& outlineColor = sf::Color(0, 0, 0)); + static Shape Circle(const Vector2f& center, float radius, const Color& color, float outline = 0.f, const Color& outlineColor = Color(0, 0, 0)); protected : diff --git a/include/SFML/System/Utf.hpp b/include/SFML/System/Utf.hpp index 1c5afadc..a28d6a0d 100644 --- a/include/SFML/System/Utf.hpp +++ b/include/SFML/System/Utf.hpp @@ -38,7 +38,7 @@ namespace sf { //////////////////////////////////////////////////////////// -/// Get the default system locale +/// \brief Get the default system locale /// /// \return Reference to the default system locale /// diff --git a/src/SFML/Audio/Music.cpp b/src/SFML/Audio/Music.cpp index ca8f7f9b..b73be31b 100644 --- a/src/SFML/Audio/Music.cpp +++ b/src/SFML/Audio/Music.cpp @@ -116,7 +116,7 @@ float Music::GetDuration() const //////////////////////////////////////////////////////////// bool Music::OnGetData(SoundStream::Chunk& data) { - sf::Lock lock(myMutex); + Lock lock(myMutex); // Fill the chunk parameters data.Samples = &mySamples[0]; @@ -132,7 +132,7 @@ bool Music::OnGetData(SoundStream::Chunk& data) //////////////////////////////////////////////////////////// void Music::OnSeek(float timeOffset) { - sf::Lock lock(myMutex); + Lock lock(myMutex); myFile->Seek(timeOffset); } diff --git a/src/SFML/Graphics/Drawable.cpp b/src/SFML/Graphics/Drawable.cpp index 4d9dc86e..5be00a80 100644 --- a/src/SFML/Graphics/Drawable.cpp +++ b/src/SFML/Graphics/Drawable.cpp @@ -316,7 +316,7 @@ void Drawable::Rotate(float angle) /// Transform a point from global coordinates into local coordinates /// (ie it applies the inverse of object's origin, translation, rotation and scale to the point) //////////////////////////////////////////////////////////// -sf::Vector2f Drawable::TransformToLocal(const sf::Vector2f& point) const +Vector2f Drawable::TransformToLocal(const Vector2f& point) const { return GetInverseMatrix().Transform(point); } @@ -325,7 +325,7 @@ sf::Vector2f Drawable::TransformToLocal(const sf::Vector2f& point) const /// Transform a point from local coordinates into global coordinates /// (ie it applies the object's origin, translation, rotation and scale to the point) //////////////////////////////////////////////////////////// -sf::Vector2f Drawable::TransformToGlobal(const sf::Vector2f& point) const +Vector2f Drawable::TransformToGlobal(const Vector2f& point) const { return GetMatrix().Transform(point); } diff --git a/src/SFML/Graphics/Font.cpp b/src/SFML/Graphics/Font.cpp index cbe170e3..c2aa941b 100644 --- a/src/SFML/Graphics/Font.cpp +++ b/src/SFML/Graphics/Font.cpp @@ -447,7 +447,7 @@ IntRect Font::FindGlyphRect(Page& page, unsigned int width, unsigned int height) std::size_t size = textureWidth * textureHeight * 4; std::vector pixels(size); memcpy(&pixels[0], page.Texture.GetPixelsPtr(), size); - page.Texture.Create(textureWidth * 2, textureHeight * 2, sf::Color(255, 255, 255, 0)); + page.Texture.Create(textureWidth * 2, textureHeight * 2, Color(255, 255, 255, 0)); page.Texture.UpdatePixels(&pixels[0], IntRect(0, 0, textureWidth, textureHeight)); // Adjust the texture coordinates of all the glyphs that are stored in this page diff --git a/src/SFML/Graphics/RenderTarget.cpp b/src/SFML/Graphics/RenderTarget.cpp index e6c3f633..041625b1 100644 --- a/src/SFML/Graphics/RenderTarget.cpp +++ b/src/SFML/Graphics/RenderTarget.cpp @@ -175,7 +175,7 @@ IntRect RenderTarget::GetViewport(const View& view) const /// Convert a point in window coordinates into view coordinates /// This version uses the current view of the window //////////////////////////////////////////////////////////// -sf::Vector2f RenderTarget::ConvertCoords(unsigned int x, unsigned int y) const +Vector2f RenderTarget::ConvertCoords(unsigned int x, unsigned int y) const { return ConvertCoords(x, y, GetView()); } @@ -185,7 +185,7 @@ sf::Vector2f RenderTarget::ConvertCoords(unsigned int x, unsigned int y) const /// Convert a point in window coordinates into view coordinates /// This version uses the given view //////////////////////////////////////////////////////////// -sf::Vector2f RenderTarget::ConvertCoords(unsigned int x, unsigned int y, const View& view) const +Vector2f RenderTarget::ConvertCoords(unsigned int x, unsigned int y, const View& view) const { // First, convert from viewport coordinates to homogeneous coordinates Vector2f coords; diff --git a/src/SFML/Graphics/RenderWindow.cpp b/src/SFML/Graphics/RenderWindow.cpp index 38166a30..ddbd6a6f 100644 --- a/src/SFML/Graphics/RenderWindow.cpp +++ b/src/SFML/Graphics/RenderWindow.cpp @@ -70,14 +70,14 @@ bool RenderWindow::Activate(bool active) //////////////////////////////////////////////////////////// unsigned int RenderWindow::GetWidth() const { - return sf::Window::GetWidth(); + return Window::GetWidth(); } //////////////////////////////////////////////////////////// unsigned int RenderWindow::GetHeight() const { - return sf::Window::GetHeight(); + return Window::GetHeight(); } diff --git a/src/SFML/Graphics/Text.cpp b/src/SFML/Graphics/Text.cpp index 00cc5745..f9cac318 100644 --- a/src/SFML/Graphics/Text.cpp +++ b/src/SFML/Graphics/Text.cpp @@ -164,7 +164,7 @@ Vector2f Text::GetCharacterPos(std::size_t index) const float space = static_cast(myFont->GetGlyph(L' ', myCharacterSize, bold).Advance); // Compute the position - sf::Vector2f position; + Vector2f position; Uint32 prevChar = 0; float lineSpacing = static_cast(myFont->GetLineSpacing(myCharacterSize)); for (std::size_t i = 0; i < index; ++i) diff --git a/src/SFML/Network/Ftp.cpp b/src/SFML/Network/Ftp.cpp index 6975621a..b9a3f4b0 100644 --- a/src/SFML/Network/Ftp.cpp +++ b/src/SFML/Network/Ftp.cpp @@ -449,7 +449,7 @@ Ftp::Response Ftp::SendCommand(const std::string& command, const std::string& pa commandStr = command + "\r\n"; // Send it to the server - if (myCommandSocket.Send(commandStr.c_str(), commandStr.length()) != sf::Socket::Done) + if (myCommandSocket.Send(commandStr.c_str(), commandStr.length()) != Socket::Done) return Response(Response::ConnectionClosed); // Get the response @@ -475,7 +475,7 @@ Ftp::Response Ftp::GetResponse() // Receive the response from the server char buffer[1024]; std::size_t length; - if (myCommandSocket.Receive(buffer, sizeof(buffer), length) != sf::Socket::Done) + if (myCommandSocket.Receive(buffer, sizeof(buffer), length) != Socket::Done) return Response(Response::ConnectionClosed); // There can be several lines inside the received buffer, extract them all @@ -625,7 +625,7 @@ Ftp::Response Ftp::DataChannel::Open(Ftp::TransferMode mode) std::string::size_type begin = response.GetMessage().find_first_of("0123456789"); if (begin != std::string::npos) { - sf::Uint8 data[6] = {0, 0, 0, 0, 0, 0}; + Uint8 data[6] = {0, 0, 0, 0, 0, 0}; std::string str = response.GetMessage().substr(begin); std::size_t index = 0; for (int i = 0; i < 6; ++i) @@ -643,10 +643,10 @@ Ftp::Response Ftp::DataChannel::Open(Ftp::TransferMode mode) // Reconstruct connection port and address unsigned short port = data[4] * 256 + data[5]; - sf::IPAddress address(static_cast(data[0]), - static_cast(data[1]), - static_cast(data[2]), - static_cast(data[3])); + IPAddress address(static_cast(data[0]), + static_cast(data[1]), + static_cast(data[2]), + static_cast(data[3])); // Connect the data channel to the server if (myDataSocket.Connect(port, address) == Socket::Done) @@ -684,7 +684,7 @@ void Ftp::DataChannel::Receive(std::vector& data) data.clear(); char buffer[1024]; std::size_t received; - while (myDataSocket.Receive(buffer, sizeof(buffer), received) == sf::Socket::Done) + while (myDataSocket.Receive(buffer, sizeof(buffer), received) == Socket::Done) { std::copy(buffer, buffer + received, std::back_inserter(data)); } diff --git a/src/SFML/Network/Http.cpp b/src/SFML/Network/Http.cpp index 1e5660f0..ad880dcd 100644 --- a/src/SFML/Network/Http.cpp +++ b/src/SFML/Network/Http.cpp @@ -404,13 +404,13 @@ Http::Response Http::SendRequest(const Http::Request& request, float timeout) if (!requestStr.empty()) { // Send it through the socket - if (myConnection.Send(requestStr.c_str(), requestStr.size()) == sf::Socket::Done) + if (myConnection.Send(requestStr.c_str(), requestStr.size()) == Socket::Done) { // Wait for the server's response std::string receivedStr; std::size_t size = 0; char buffer[1024]; - while (myConnection.Receive(buffer, sizeof(buffer), size) == sf::Socket::Done) + while (myConnection.Receive(buffer, sizeof(buffer), size) == Socket::Done) { receivedStr.append(buffer, buffer + size); } diff --git a/src/SFML/System/Clock.cpp b/src/SFML/System/Clock.cpp index baeb9655..b4cd9a09 100644 --- a/src/SFML/System/Clock.cpp +++ b/src/SFML/System/Clock.cpp @@ -41,14 +41,14 @@ Clock::Clock() //////////////////////////////////////////////////////////// float Clock::GetElapsedTime() const { - return static_cast(sf::priv::Platform::GetSystemTime() - myStartTime); + return static_cast(priv::Platform::GetSystemTime() - myStartTime); } //////////////////////////////////////////////////////////// void Clock::Reset() { - myStartTime = sf::priv::Platform::GetSystemTime(); + myStartTime = priv::Platform::GetSystemTime(); } } // namespace sf