Simplify in-class initializer expressions

This commit is contained in:
Chris Thrasher 2023-01-02 12:31:40 -07:00
parent 259b57d9b9
commit 9a4426fb35
45 changed files with 169 additions and 169 deletions

View File

@ -95,9 +95,9 @@ public:
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
std::uint8_t r{0}; //!< Red component
std::uint8_t g{0}; //!< Green component
std::uint8_t b{0}; //!< Blue component
std::uint8_t r{}; //!< Red component
std::uint8_t g{}; //!< Green component
std::uint8_t b{}; //!< Blue component
std::uint8_t a{255}; //!< Alpha (opacity) component
};

View File

@ -339,7 +339,7 @@ private:
{
}
unsigned int width{0}; //!< Current width of the row
unsigned int width{}; //!< Current width of the row
unsigned int top; //!< Y position of the row into the texture
unsigned int height; //!< Height of the row
};

View File

@ -144,8 +144,8 @@ struct Vector4
copyVector(color, *this);
}
T x{0}; //!< 1st component (X) of the 4D vector
T y{0}; //!< 2nd component (Y) of the 4D vector
T z{0}; //!< 3rd component (Z) of the 4D vector
T w{0}; //!< 4th component (W) of the 4D vector
T x{}; //!< 1st component (X) of the 4D vector
T y{}; //!< 2nd component (Y) of the 4D vector
T z{}; //!< 3rd component (Z) of the 4D vector
T w{}; //!< 4th component (W) of the 4D vector
};

View File

@ -44,9 +44,9 @@ public:
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
float advance{0}; //!< Offset to move horizontally to the next character
int lsbDelta{0}; //!< Left offset after forced autohint. Internally used by getKerning()
int rsbDelta{0}; //!< Right offset after forced autohint. Internally used by getKerning()
float advance{}; //!< Offset to move horizontally to the next character
int lsbDelta{}; //!< Left offset after forced autohint. Internally used by getKerning()
int rsbDelta{}; //!< Right offset after forced autohint. Internally used by getKerning()
FloatRect bounds; //!< Bounding rectangle of the glyph, in coordinates relative to the baseline
IntRect textureRect; //!< Texture coordinates of the glyph inside the font's texture
};

View File

@ -127,10 +127,10 @@ public:
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
T left{0}; //!< Left coordinate of the rectangle
T top{0}; //!< Top coordinate of the rectangle
T width{0}; //!< Width of the rectangle
T height{0}; //!< Height of the rectangle
T left{}; //!< Left coordinate of the rectangle
T top{}; //!< Top coordinate of the rectangle
T width{}; //!< Width of the rectangle
T height{}; //!< Height of the rectangle
};
////////////////////////////////////////////////////////////

View File

@ -113,8 +113,8 @@ public:
////////////////////////////////////////////////////////////
BlendMode blendMode{BlendAlpha}; //!< Blending mode
Transform transform; //!< Transform
const Texture* texture{nullptr}; //!< Texture
const Shader* shader{nullptr}; //!< Shader
const Texture* texture{}; //!< Texture
const Shader* shader{}; //!< Shader
};
} // namespace sf

View File

@ -485,7 +485,7 @@ private:
};
bool enable; //!< Is the cache enabled?
bool glStatesSet{false}; //!< Are our internal GL states set yet?
bool glStatesSet{}; //!< Are our internal GL states set yet?
bool viewChanged; //!< Has the current view changed since last draw?
BlendMode lastBlendMode; //!< Cached blending mode
std::uint64_t lastTextureId; //!< Cached texture
@ -500,7 +500,7 @@ private:
View m_defaultView; //!< Default view
View m_view; //!< Current view
StatesCache m_cache; //!< Render states cache
std::uint64_t m_id{0}; //!< Unique number that identifies the RenderTarget
std::uint64_t m_id{}; //!< Unique number that identifies the RenderTarget
};
} // namespace sf

View File

@ -165,7 +165,7 @@ private:
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
unsigned int m_defaultFrameBuffer{0}; //!< Framebuffer to bind when targeting this window
unsigned int m_defaultFrameBuffer{}; //!< Framebuffer to bind when targeting this window
};
} // namespace sf

View File

@ -698,7 +698,7 @@ private:
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
unsigned int m_shaderProgram{0}; //!< OpenGL identifier for the program
unsigned int m_shaderProgram{}; //!< OpenGL identifier for the program
int m_currentTexture{-1}; //!< Location of the current texture in the shader
TextureTable m_textures; //!< Texture variables in the shader, mapped to their location
UniformTable m_uniforms; //!< Parameters location cache

View File

@ -303,11 +303,11 @@ private:
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
const Texture* m_texture{nullptr}; //!< Texture of the shape
const Texture* m_texture{}; //!< Texture of the shape
IntRect m_textureRect; //!< Rectangle defining the area of the source texture to display
Color m_fillColor{Color::White}; //!< Fill color
Color m_outlineColor{Color::White}; //!< Outline color
float m_outlineThickness{0}; //!< Thickness of the shape's outline
float m_outlineThickness{}; //!< Thickness of the shape's outline
VertexArray m_vertices{PrimitiveType::TriangleFan}; //!< Vertex array containing the fill geometry
VertexArray m_outlineVertices{PrimitiveType::TriangleStrip}; //!< Vertex array containing the outline geometry
FloatRect m_insideBounds; //!< Bounding rectangle of the inside (fill)

View File

@ -214,7 +214,7 @@ private:
// Member data
////////////////////////////////////////////////////////////
Vertex m_vertices[4]; //!< Vertices defining the sprite's geometry
const Texture* m_texture{nullptr}; //!< Texture of the sprite
const Texture* m_texture{}; //!< Texture of the sprite
IntRect m_textureRect; //!< Rectangle defining the area of the source texture to display
};

View File

@ -428,7 +428,7 @@ private:
// Member data
////////////////////////////////////////////////////////////
String m_string; //!< String to display
const Font* m_font{nullptr}; //!< Font used to display the string
const Font* m_font{}; //!< Font used to display the string
unsigned int m_characterSize{30}; //!< Base size of characters, in pixels
float m_letterSpacingFactor{1.f}; //!< Spacing factor between letters
float m_lineSpacingFactor{1.f}; //!< Spacing factor between lines
@ -439,8 +439,8 @@ private:
mutable VertexArray m_vertices{PrimitiveType::Triangles}; //!< Vertex array containing the fill geometry
mutable VertexArray m_outlineVertices{PrimitiveType::Triangles}; //!< Vertex array containing the outline geometry
mutable FloatRect m_bounds; //!< Bounding rectangle of the text (in local coordinates)
mutable bool m_geometryNeedUpdate{false}; //!< Does the geometry need to be recomputed?
mutable std::uint64_t m_fontTextureId{0}; //!< The font texture id
mutable bool m_geometryNeedUpdate{}; //!< Does the geometry need to be recomputed?
mutable std::uint64_t m_fontTextureId{}; //!< The font texture id
};
} // namespace sf

View File

@ -612,13 +612,13 @@ private:
////////////////////////////////////////////////////////////
Vector2u m_size; //!< Public texture size
Vector2u m_actualSize; //!< Actual texture size (can be greater than public size because of padding)
unsigned int m_texture{0}; //!< Internal texture identifier
bool m_isSmooth{false}; //!< Status of the smooth filter
bool m_sRgb{false}; //!< Should the texture source be converted from sRGB?
bool m_isRepeated{false}; //!< Is the texture in repeat mode?
mutable bool m_pixelsFlipped{false}; //!< To work around the inconsistency in Y orientation
bool m_fboAttachment{false}; //!< Is this texture owned by a framebuffer object?
bool m_hasMipmap{false}; //!< Has the mipmap been generated?
unsigned int m_texture{}; //!< Internal texture identifier
bool m_isSmooth{}; //!< Status of the smooth filter
bool m_sRgb{}; //!< Should the texture source be converted from sRGB?
bool m_isRepeated{}; //!< Is the texture in repeat mode?
mutable bool m_pixelsFlipped{}; //!< To work around the inconsistency in Y orientation
bool m_fboAttachment{}; //!< Is this texture owned by a framebuffer object?
bool m_hasMipmap{}; //!< Has the mipmap been generated?
std::uint64_t m_cacheId; //!< Unique number that identifies the texture to the render target's cache
};

View File

@ -333,8 +333,8 @@ private:
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
unsigned int m_buffer{0}; //!< Internal buffer identifier
std::size_t m_size{0}; //!< Size in Vertexes of the currently allocated buffer
unsigned int m_buffer{}; //!< Internal buffer identifier
std::size_t m_size{}; //!< Size in Vertexes of the currently allocated buffer
PrimitiveType m_primitiveType{PrimitiveType::Points}; //!< Type of primitives to draw
Usage m_usage{Stream}; //!< How this vertex buffer is to be used
};

View File

@ -241,8 +241,8 @@ private:
FloatRect m_viewport{{0, 0}, {1, 1}}; //!< Viewport rectangle, expressed as a factor of the render-target's size
mutable Transform m_transform; //!< Precomputed projection transform corresponding to the view
mutable Transform m_inverseTransform; //!< Precomputed inverse projection transform corresponding to the view
mutable bool m_transformUpdated{false}; //!< Internal state telling if the transform needs to be updated
mutable bool m_invTransformUpdated{false}; //!< Internal state telling if the inverse transform needs to be updated
mutable bool m_transformUpdated{}; //!< Internal state telling if the transform needs to be updated
mutable bool m_invTransformUpdated{}; //!< Internal state telling if the inverse transform needs to be updated
};
} // namespace sf

View File

@ -328,8 +328,8 @@ public:
////////////////////////////////////////////////////////////
FieldTable m_fields; //!< Fields of the header
Status m_status{Status::ConnectionFailed}; //!< Status code
unsigned int m_majorVersion{0}; //!< Major HTTP version
unsigned int m_minorVersion{0}; //!< Minor HTTP version
unsigned int m_majorVersion{}; //!< Major HTTP version
unsigned int m_minorVersion{}; //!< Minor HTTP version
std::string m_body; //!< Body of the response
};
@ -411,7 +411,7 @@ private:
TcpSocket m_connection; //!< Connection to the host
std::optional<IpAddress> m_host; //!< Web host address
std::string m_hostName; //!< Web host name
unsigned short m_port{0}; //!< Port used for connection with host
unsigned short m_port{}; //!< Port used for connection with host
};
} // namespace sf

View File

@ -432,8 +432,8 @@ private:
// Member data
////////////////////////////////////////////////////////////
std::vector<char> m_data; //!< Data stored in the packet
std::size_t m_readPos{0}; //!< Current reading position in the packet
std::size_t m_sendPos{0}; //!< Current send position in the packet (for handling partial sends)
std::size_t m_readPos{}; //!< Current reading position in the packet
std::size_t m_sendPos{}; //!< Current send position in the packet (for handling partial sends)
bool m_isValid{true}; //!< Reading state of the packet
};

View File

@ -218,8 +218,8 @@ private:
////////////////////////////////////////////////////////////
struct PendingPacket
{
std::uint32_t Size{0}; //!< Data of packet size
std::size_t SizeReceived{0}; //!< Number of size bytes received so far
std::uint32_t Size{}; //!< Data of packet size
std::size_t SizeReceived{}; //!< Number of size bytes received so far
std::vector<char> Data; //!< Data of the packet
};

View File

@ -160,7 +160,7 @@ private:
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
float m_degrees{0}; //!< Angle value stored as degrees
float m_degrees{}; //!< Angle value stored as degrees
};
////////////////////////////////////////////////////////////

View File

@ -104,9 +104,9 @@ private:
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
const char* m_data{nullptr}; //!< Pointer to the data in memory
std::int64_t m_size{0}; //!< Total size of the data
std::int64_t m_offset{0}; //!< Current reading position
const char* m_data{}; //!< Pointer to the data in memory
std::int64_t m_size{}; //!< Total size of the data
std::int64_t m_offset{}; //!< Current reading position
};
} // namespace sf

View File

@ -119,7 +119,7 @@ private:
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
std::chrono::microseconds m_microseconds{0}; //!< Time value stored as microseconds
std::chrono::microseconds m_microseconds{}; //!< Time value stored as microseconds
};
////////////////////////////////////////////////////////////

View File

@ -209,8 +209,8 @@ public:
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
T x{0}; //!< X coordinate of the vector
T y{0}; //!< Y coordinate of the vector
T x{}; //!< X coordinate of the vector
T y{}; //!< Y coordinate of the vector
////////////////////////////////////////////////////////////

View File

@ -133,9 +133,9 @@ public:
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
T x{0}; //!< X coordinate of the vector
T y{0}; //!< Y coordinate of the vector
T z{0}; //!< Z coordinate of the vector
T x{}; //!< X coordinate of the vector
T y{}; //!< Y coordinate of the vector
T z{}; //!< Z coordinate of the vector
};
////////////////////////////////////////////////////////////

View File

@ -71,8 +71,8 @@ enum Axis
struct SFML_WINDOW_API Identification
{
String name{"No Joystick"}; //!< Name of the joystick
unsigned int vendorId{0}; //!< Manufacturer identifier
unsigned int productId{0}; //!< Product identifier
unsigned int vendorId{}; //!< Manufacturer identifier
unsigned int productId{}; //!< Product identifier
};
////////////////////////////////////////////////////////////

View File

@ -100,7 +100,7 @@ public:
// Member data
////////////////////////////////////////////////////////////
Vector2u size; //!< Video mode width and height, in pixels
unsigned int bitsPerPixel{0}; //!< Video mode pixel depth, in bits per pixels
unsigned int bitsPerPixel{}; //!< Video mode pixel depth, in bits per pixels
};
////////////////////////////////////////////////////////////

View File

@ -138,14 +138,14 @@ private:
////////////////////////////////////////////////////////////
std::unordered_map<std::uint64_t, unsigned int> m_frameBuffers; //!< OpenGL frame buffer objects per context
std::unordered_map<std::uint64_t, unsigned int> m_multisampleFrameBuffers; //!< Optional per-context OpenGL frame buffer objects with multisample attachments
unsigned int m_depthStencilBuffer{0}; //!< Optional depth/stencil buffer attached to the frame buffer
unsigned int m_colorBuffer{0}; //!< Optional multisample color buffer attached to the frame buffer
unsigned int m_depthStencilBuffer{}; //!< Optional depth/stencil buffer attached to the frame buffer
unsigned int m_colorBuffer{}; //!< Optional multisample color buffer attached to the frame buffer
Vector2u m_size; //!< Width and height of the attachments
std::unique_ptr<Context> m_context; //!< Backup OpenGL context, used when none already exist
unsigned int m_textureId{0}; //!< The ID of the texture to attach to the FBO
bool m_multisample{false}; //!< Whether we have to create a multisample frame buffer as well
bool m_stencil{false}; //!< Whether we have stencil attachment
bool m_sRgb{false}; //!< Whether we need to encode drawn pixels into sRGB color space
unsigned int m_textureId{}; //!< The ID of the texture to attach to the FBO
bool m_multisample{}; //!< Whether we have to create a multisample frame buffer as well
bool m_stencil{}; //!< Whether we have stencil attachment
bool m_sRgb{}; //!< Whether we need to encode drawn pixels into sRGB color space
};
} // namespace priv

View File

@ -225,7 +225,7 @@ struct Shader::UniformBinder
UniformBinder& operator=(const UniformBinder&) = delete;
TransientContextLock lock; //!< Lock to keep context active while uniform is bound
GLEXT_GLhandle savedProgram{0}; //!< Handle to the previously active program object
GLEXT_GLhandle savedProgram{}; //!< Handle to the previously active program object
GLEXT_GLhandle currentProgram; //!< Handle to the program object of the modified sf::Shader instance
GLint location{-1}; //!< Uniform location, used by the surrounding sf::Shader code
};

View File

@ -232,9 +232,9 @@ private:
static int getUnicode(AInputEvent* event);
Vector2u m_size;
bool m_windowBeingCreated{false};
bool m_windowBeingDestroyed{false};
bool m_hasFocus{false};
bool m_windowBeingCreated{};
bool m_windowBeingDestroyed{};
bool m_hasFocus{};
};
} // namespace priv

View File

@ -272,7 +272,7 @@ int findDrmDevice(drmModeResPtr& resources)
{
static const int maxDrmDevices = 64;
drmDevicePtr devices[maxDrmDevices] = {nullptr};
drmDevicePtr devices[maxDrmDevices] = {};
const int numDevices = drmGetDevices2(0, devices, maxDrmDevices);
if (numDevices < 0)

View File

@ -201,14 +201,14 @@ private:
EGLDisplay m_display{EGL_NO_DISPLAY}; ///< The internal EGL display
EGLContext m_context{EGL_NO_CONTEXT}; ///< The internal EGL context
EGLSurface m_surface{EGL_NO_SURFACE}; ///< The internal EGL surface
EGLConfig m_config{nullptr}; ///< The internal EGL config
EGLConfig m_config{}; ///< The internal EGL config
gbm_bo* m_currentBO{nullptr};
gbm_bo* m_nextBO{nullptr};
gbm_surface* m_gbmSurface{nullptr};
gbm_bo* m_currentBO{};
gbm_bo* m_nextBO{};
gbm_surface* m_gbmSurface{};
Vector2u m_size;
bool m_shown{false};
bool m_scanOut{false};
bool m_shown{};
bool m_scanOut{};
};
} // namespace priv

View File

@ -190,7 +190,7 @@ private:
EGLDisplay m_display{EGL_NO_DISPLAY}; //!< The internal EGL display
EGLContext m_context{EGL_NO_CONTEXT}; //!< The internal EGL context
EGLSurface m_surface{EGL_NO_SURFACE}; //!< The internal EGL surface
EGLConfig m_config{nullptr}; //!< The internal EGL config
EGLConfig m_config{}; //!< The internal EGL config
};
} // namespace priv

View File

@ -42,7 +42,7 @@ namespace priv
////////////////////////////////////////////////////////////
struct JoystickCaps
{
unsigned int buttonCount{0}; //!< Number of buttons supported by the joystick
unsigned int buttonCount{}; //!< Number of buttons supported by the joystick
bool axes[Joystick::AxisCount]{}; //!< Support for each axis
};
@ -53,7 +53,7 @@ struct JoystickCaps
////////////////////////////////////////////////////////////
struct JoystickState
{
bool connected{false}; //!< Is the joystick currently connected?
bool connected{}; //!< Is the joystick currently connected?
float axes[Joystick::AxisCount]{}; //!< Position of each axis, in range [-100, 100]
bool buttons[Joystick::ButtonCount]{}; //!< Status of each button (true = pressed)
};

View File

@ -220,9 +220,9 @@ private:
// Member data
////////////////////////////////////////////////////////////
bool m_isValid{true}; ///< If any error occurs this variable is false
CFDataRef m_layoutData{0}; ///< CFData containing the layout
UCKeyboardLayout* m_layout{nullptr}; ///< Current Keyboard Layout
IOHIDManagerRef m_manager{0}; ///< HID Manager
CFDataRef m_layoutData{}; ///< CFData containing the layout
UCKeyboardLayout* m_layout{}; ///< Current Keyboard Layout
IOHIDManagerRef m_manager{}; ///< HID Manager
IOHIDElements m_keys[Keyboard::KeyCount]; ///< All the keys on any connected keyboard

View File

@ -122,8 +122,8 @@ private:
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
IOHIDManagerRef m_manager{0}; ///< HID Manager
unsigned int m_joystickCount{0}; ///< Number of joysticks currently connected
IOHIDManagerRef m_manager{}; ///< HID Manager
unsigned int m_joystickCount{}; ///< Number of joysticks currently connected
};

View File

@ -155,9 +155,9 @@ private:
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
NSOpenGLContextRef m_context{0}; ///< OpenGL context.
NSOpenGLViewRef m_view{0}; ///< Only for offscreen context.
NSWindowRef m_window{0}; ///< Only for offscreen context.
NSOpenGLContextRef m_context{}; ///< OpenGL context.
NSOpenGLViewRef m_view{}; ///< Only for offscreen context.
NSWindowRef m_window{}; ///< Only for offscreen context.
};
} // namespace priv

View File

@ -135,7 +135,7 @@ private:
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
::Window m_window{0}; ///< X identifier defining our window
::Window m_window{}; ///< X identifier defining our window
::Display* m_display; ///< Pointer to the display
Atom m_clipboard; ///< X Atom identifying the CLIPBOARD selection
Atom m_targets; ///< X Atom identifying TARGETS
@ -144,7 +144,7 @@ private:
Atom m_targetProperty; ///< X Atom identifying our destination window property
String m_clipboardContents; ///< Our clipboard contents
std::deque<XEvent> m_events; ///< Queue we use to store pending events for this window
bool m_requestResponded{false}; ///< Holds whether our selection request has been responded to or not
bool m_requestResponded{}; ///< Holds whether our selection request has been responded to or not
};
} // namespace priv

View File

@ -175,11 +175,11 @@ private:
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
::Display* m_display{nullptr}; ///< Connection to the X server
::Window m_window{0}; ///< Window to which the context is attached
GLXContext m_context{nullptr}; ///< OpenGL context
GLXPbuffer m_pbuffer{0}; ///< GLX pbuffer ID if one was created
bool m_ownsWindow{false}; ///< Do we own the window associated to the context?
::Display* m_display{}; ///< Connection to the X server
::Window m_window{}; ///< Window to which the context is attached
GLXContext m_context{}; ///< OpenGL context
GLXPbuffer m_pbuffer{}; ///< GLX pbuffer ID if one was created
bool m_ownsWindow{}; ///< Do we own the window associated to the context?
};
} // namespace priv

View File

@ -90,11 +90,11 @@ struct VulkanLibraryWrapper
return (entryPoint != nullptr);
}
void* library{nullptr};
void* library{};
PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr{nullptr};
PFN_vkEnumerateInstanceLayerProperties vkEnumerateInstanceLayerProperties{nullptr};
PFN_vkEnumerateInstanceExtensionProperties vkEnumerateInstanceExtensionProperties{nullptr};
PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr{};
PFN_vkEnumerateInstanceLayerProperties vkEnumerateInstanceLayerProperties{};
PFN_vkEnumerateInstanceExtensionProperties vkEnumerateInstanceExtensionProperties{};
};
VulkanLibraryWrapper wrapper;

View File

@ -296,25 +296,25 @@ private:
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
::Window m_window{0}; ///< X identifier defining our window
::Window m_window{}; ///< X identifier defining our window
::Display* m_display; ///< Pointer to the display
int m_screen; ///< Screen identifier
XIM m_inputMethod{nullptr}; ///< Input method linked to the X display
XIC m_inputContext{nullptr}; ///< Input context used to get unicode input in our window
XIM m_inputMethod{}; ///< Input method linked to the X display
XIC m_inputContext{}; ///< Input context used to get unicode input in our window
bool m_isExternal; ///< Tell whether the window has been created externally or by SFML
RRMode m_oldVideoMode{0}; ///< Video mode in use before we switch to fullscreen
RRCrtc m_oldRRCrtc{0}; ///< RRCrtc in use before we switch to fullscreen
::Cursor m_hiddenCursor{0}; ///< As X11 doesn't provide cursor hiding, we must create a transparent one
RRMode m_oldVideoMode{}; ///< Video mode in use before we switch to fullscreen
RRCrtc m_oldRRCrtc{}; ///< RRCrtc in use before we switch to fullscreen
::Cursor m_hiddenCursor{}; ///< As X11 doesn't provide cursor hiding, we must create a transparent one
::Cursor m_lastCursor{None}; ///< Last cursor used -- this data is not owned by the window and is required to be always valid
bool m_keyRepeat{true}; ///< Is the KeyRepeat feature enabled?
Vector2i m_previousSize{-1, -1}; ///< Previous size of the window, to find if a ConfigureNotify event is a resize event (could be a move event only)
bool m_useSizeHints{false}; ///< Is the size of the window fixed with size hints?
bool m_fullscreen{false}; ///< Is the window in fullscreen?
bool m_cursorGrabbed{false}; ///< Is the mouse cursor trapped?
bool m_windowMapped{false}; ///< Has the window been mapped by the window manager?
Pixmap m_iconPixmap{0}; ///< The current icon pixmap if in use
Pixmap m_iconMaskPixmap{0}; ///< The current icon mask pixmap if in use
::Time m_lastInputTime{0}; ///< Last time we received user input
bool m_useSizeHints{}; ///< Is the size of the window fixed with size hints?
bool m_fullscreen{}; ///< Is the window in fullscreen?
bool m_cursorGrabbed{}; ///< Is the mouse cursor trapped?
bool m_windowMapped{}; ///< Has the window been mapped by the window manager?
Pixmap m_iconPixmap{}; ///< The current icon pixmap if in use
Pixmap m_iconMaskPixmap{}; ///< The current icon mask pixmap if in use
::Time m_lastInputTime{}; ///< Last time we received user input
};
} // namespace priv

View File

@ -98,8 +98,8 @@ private:
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
void* m_cursor{nullptr}; // Type erasure via `void*` is used here to avoid depending on `windows.h`
bool m_systemCursor{false};
void* m_cursor{}; // Type erasure via `void*` is used here to avoid depending on `windows.h`
bool m_systemCursor{};
};
} // namespace priv

View File

@ -103,7 +103,7 @@ namespace
{
struct ConnectionCache
{
bool connected{false};
bool connected{};
sf::Clock timer;
};
const sf::Time connectionRefreshDelay = sf::milliseconds(500);

View File

@ -89,11 +89,11 @@ struct VulkanLibraryWrapper
return (entryPoint != nullptr);
}
HMODULE library{nullptr};
HMODULE library{};
PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr{nullptr};
PFN_vkEnumerateInstanceLayerProperties vkEnumerateInstanceLayerProperties{nullptr};
PFN_vkEnumerateInstanceExtensionProperties vkEnumerateInstanceExtensionProperties{nullptr};
PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr{};
PFN_vkEnumerateInstanceLayerProperties vkEnumerateInstanceLayerProperties{};
PFN_vkEnumerateInstanceExtensionProperties vkEnumerateInstanceExtensionProperties{};
};
VulkanLibraryWrapper wrapper;

View File

@ -178,11 +178,11 @@ private:
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
HWND m_window{nullptr}; //!< Window to which the context is attached
HPBUFFERARB m_pbuffer{nullptr}; //!< Handle to a pbuffer if one was created
HDC m_deviceContext{nullptr}; //!< Device context associated to the context
HGLRC m_context{nullptr}; //!< OpenGL context
bool m_ownsWindow{false}; //!< Do we own the target window?
HWND m_window{}; //!< Window to which the context is attached
HPBUFFERARB m_pbuffer{}; //!< Handle to a pbuffer if one was created
HDC m_deviceContext{}; //!< Device context associated to the context
HGLRC m_context{}; //!< OpenGL context
bool m_ownsWindow{}; //!< Do we own the target window?
};
} // namespace priv

View File

@ -268,19 +268,19 @@ private:
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
HWND m_handle{nullptr}; //!< Win32 handle of the window
LONG_PTR m_callback{0}; //!< Stores the original event callback function of the control
HWND m_handle{}; //!< Win32 handle of the window
LONG_PTR m_callback{}; //!< Stores the original event callback function of the control
bool m_cursorVisible{true}; //!< Is the cursor visible or hidden?
HCURSOR m_lastCursor{
LoadCursor(nullptr, IDC_ARROW)}; //!< Last cursor used -- this data is not owned by the window and is required to be always valid
HICON m_icon{nullptr}; //!< Custom icon assigned to the window
HICON m_icon{}; //!< Custom icon assigned to the window
bool m_keyRepeatEnabled{true}; //!< Automatic key-repeat state for keydown events
Vector2u m_lastSize; //!< The last handled size of the window
bool m_resizing{false}; //!< Is the window being resized?
std::uint16_t m_surrogate{0}; //!< First half of the surrogate pair, in case we're receiving a Unicode character in two events
bool m_mouseInside{false}; //!< Mouse is inside the window?
bool m_fullscreen{false}; //!< Is the window fullscreen?
bool m_cursorGrabbed{false}; //!< Is the mouse cursor trapped?
bool m_resizing{}; //!< Is the window being resized?
std::uint16_t m_surrogate{}; //!< First half of the surrogate pair, in case we're receiving a Unicode character in two events
bool m_mouseInside{}; //!< Mouse is inside the window?
bool m_fullscreen{}; //!< Is the window fullscreen?
bool m_cursorGrabbed{}; //!< Is the mouse cursor trapped?
};
} // namespace priv

View File

@ -159,10 +159,10 @@ private:
// Member data
////////////////////////////////////////////////////////////
EAGLContext* m_context; ///< The internal context
GLuint m_framebuffer{0}; ///< Frame buffer associated to the context
GLuint m_colorbuffer{0}; ///< Color render buffer
GLuint m_depthbuffer{0}; ///< Depth render buffer
bool m_vsyncEnabled{false}; ///< Vertical sync activation flag
GLuint m_framebuffer{}; ///< Frame buffer associated to the context
GLuint m_colorbuffer{}; ///< Color render buffer
GLuint m_depthbuffer{}; ///< Depth render buffer
bool m_vsyncEnabled{}; ///< Vertical sync activation flag
Clock m_clock; ///< Measures the elapsed time for the fake v-sync implementation
};