[Spice-devel] [PATCH 2/3] Use const when possible
Snir Sheriber
ssheribe at redhat.com
Wed May 1 12:31:34 UTC 2019
---
src/mjpeg-fallback.cpp | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/mjpeg-fallback.cpp b/src/mjpeg-fallback.cpp
index 1b263f2..ef7a13d 100644
--- a/src/mjpeg-fallback.cpp
+++ b/src/mjpeg-fallback.cpp
@@ -44,7 +44,7 @@ public:
std::vector<DeviceDisplayInfo> get_device_display_info() const override;
private:
MjpegSettings settings;
- Display *dpy;
+ Display *const dpy;
std::vector<uint8_t> frame;
@@ -57,9 +57,8 @@ private:
}
MjpegFrameCapture::MjpegFrameCapture(const MjpegSettings& settings):
- settings(settings)
+ settings(settings),dpy(XOpenDisplay(nullptr))
{
- dpy = XOpenDisplay(NULL);
if (!dpy)
throw std::runtime_error("Unable to initialize X11");
}
--
2.20.1
More information about the Spice-devel
mailing list