mirror of
https://github.com/SFML/SFML.git
synced 2024-11-25 04:41:05 +08:00
Use '{}' for default parameter initialization
This commit is contained in:
parent
e9fadbbcb3
commit
8b36da3625
@ -217,10 +217,7 @@ public:
|
||||
/// \return True if the operation was successful, false otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
[[nodiscard]] bool copy(const Image& source,
|
||||
const Vector2u& dest,
|
||||
const IntRect& sourceRect = IntRect({0, 0}, {0, 0}),
|
||||
bool applyAlpha = false);
|
||||
[[nodiscard]] bool copy(const Image& source, const Vector2u& dest, const IntRect& sourceRect = {}, bool applyAlpha = false);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Change the color of a pixel
|
||||
|
@ -51,7 +51,7 @@ public:
|
||||
/// \param size Size of the rectangle
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
explicit RectangleShape(const Vector2f& size = Vector2f(0, 0));
|
||||
explicit RectangleShape(const Vector2f& size = {});
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the size of the rectangle
|
||||
|
@ -129,7 +129,7 @@ public:
|
||||
/// \see loadFromMemory, loadFromStream, loadFromImage
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
[[nodiscard]] bool loadFromFile(const std::filesystem::path& filename, const IntRect& area = IntRect());
|
||||
[[nodiscard]] bool loadFromFile(const std::filesystem::path& filename, const IntRect& area = {});
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Load the texture from a file in memory
|
||||
@ -154,7 +154,7 @@ public:
|
||||
/// \see loadFromFile, loadFromStream, loadFromImage
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
[[nodiscard]] bool loadFromMemory(const void* data, std::size_t size, const IntRect& area = IntRect());
|
||||
[[nodiscard]] bool loadFromMemory(const void* data, std::size_t size, const IntRect& area = {});
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Load the texture from a custom stream
|
||||
@ -178,7 +178,7 @@ public:
|
||||
/// \see loadFromFile, loadFromMemory, loadFromImage
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
[[nodiscard]] bool loadFromStream(InputStream& stream, const IntRect& area = IntRect());
|
||||
[[nodiscard]] bool loadFromStream(InputStream& stream, const IntRect& area = {});
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Load the texture from an image
|
||||
@ -202,7 +202,7 @@ public:
|
||||
/// \see loadFromFile, loadFromMemory
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
[[nodiscard]] bool loadFromImage(const Image& image, const IntRect& area = IntRect());
|
||||
[[nodiscard]] bool loadFromImage(const Image& image, const IntRect& area = {});
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Return the size of the texture
|
||||
|
@ -120,7 +120,7 @@ public:
|
||||
/// \param locale Locale to use for conversion
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
String(char ansiChar, const std::locale& locale = std::locale());
|
||||
String(char ansiChar, const std::locale& locale = {});
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Construct from single wide character
|
||||
@ -148,7 +148,7 @@ public:
|
||||
/// \param locale Locale to use for conversion
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
String(const char* ansiString, const std::locale& locale = std::locale());
|
||||
String(const char* ansiString, const std::locale& locale = {});
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Construct from an ANSI string and a locale
|
||||
@ -160,7 +160,7 @@ public:
|
||||
/// \param locale Locale to use for conversion
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
String(const std::string& ansiString, const std::locale& locale = std::locale());
|
||||
String(const std::string& ansiString, const std::locale& locale = {});
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Construct from null-terminated C-style wide string
|
||||
@ -287,7 +287,7 @@ public:
|
||||
/// \see toWideString, operator std::string
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
[[nodiscard]] std::string toAnsiString(const std::locale& locale = std::locale()) const;
|
||||
[[nodiscard]] std::string toAnsiString(const std::locale& locale = {}) const;
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Convert the Unicode string to a wide string
|
||||
|
@ -134,7 +134,7 @@ public:
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
template <typename In, typename Out>
|
||||
static Out fromAnsi(In begin, In end, Out output, const std::locale& locale = std::locale());
|
||||
static Out fromAnsi(In begin, In end, Out output, const std::locale& locale = {});
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Convert a wide characters range to UTF-8
|
||||
@ -178,7 +178,7 @@ public:
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
template <typename In, typename Out>
|
||||
static Out toAnsi(In begin, In end, Out output, char replacement = 0, const std::locale& locale = std::locale());
|
||||
static Out toAnsi(In begin, In end, Out output, char replacement = 0, const std::locale& locale = {});
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Convert an UTF-8 characters range to wide characters
|
||||
@ -340,7 +340,7 @@ public:
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
template <typename In, typename Out>
|
||||
static Out fromAnsi(In begin, In end, Out output, const std::locale& locale = std::locale());
|
||||
static Out fromAnsi(In begin, In end, Out output, const std::locale& locale = {});
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Convert a wide characters range to UTF-16
|
||||
@ -384,7 +384,7 @@ public:
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
template <typename In, typename Out>
|
||||
static Out toAnsi(In begin, In end, Out output, char replacement = 0, const std::locale& locale = std::locale());
|
||||
static Out toAnsi(In begin, In end, Out output, char replacement = 0, const std::locale& locale = {});
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Convert an UTF-16 characters range to wide characters
|
||||
@ -547,7 +547,7 @@ public:
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
template <typename In, typename Out>
|
||||
static Out fromAnsi(In begin, In end, Out output, const std::locale& locale = std::locale());
|
||||
static Out fromAnsi(In begin, In end, Out output, const std::locale& locale = {});
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Convert a wide characters range to UTF-32
|
||||
@ -591,7 +591,7 @@ public:
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
template <typename In, typename Out>
|
||||
static Out toAnsi(In begin, In end, Out output, char replacement = 0, const std::locale& locale = std::locale());
|
||||
static Out toAnsi(In begin, In end, Out output, char replacement = 0, const std::locale& locale = {});
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Convert an UTF-32 characters range to wide characters
|
||||
@ -679,7 +679,7 @@ public:
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
template <typename In>
|
||||
static std::uint32_t decodeAnsi(In input, const std::locale& locale = std::locale());
|
||||
static std::uint32_t decodeAnsi(In input, const std::locale& locale = {});
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Decode a single wide character to UTF-32
|
||||
@ -712,7 +712,7 @@ public:
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
template <typename Out>
|
||||
static Out encodeAnsi(std::uint32_t codepoint, Out output, char replacement = 0, const std::locale& locale = std::locale());
|
||||
static Out encodeAnsi(std::uint32_t codepoint, Out output, char replacement = 0, const std::locale& locale = {});
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Encode a single UTF-32 character to wide
|
||||
|
Loading…
Reference in New Issue
Block a user