diff options
author | Peter Åstrand (astrand) <astrand@cendio.se> | 2017-10-09 14:59:24 +0200 |
---|---|---|
committer | Peter Åstrand (astrand) <astrand@cendio.se> | 2017-11-07 11:05:34 +0100 |
commit | f523ee14c68e775dcb1cdd2822629b6b29c7a4ef (patch) | |
tree | 3166068d8534598f2f8ba53900afd03e0a78c43d /unix | |
parent | daba227da64b488a264417708e91e285aeb2fa54 (diff) | |
download | tigervnc-f523ee14c68e775dcb1cdd2822629b6b29c7a4ef.tar.gz tigervnc-f523ee14c68e775dcb1cdd2822629b6b29c7a4ef.zip |
Using namespace rfb in header files is a bad idea
Diffstat (limited to 'unix')
-rw-r--r-- | unix/x0vncserver/Geometry.cxx | 2 | ||||
-rw-r--r-- | unix/x0vncserver/Geometry.h | 10 | ||||
-rw-r--r-- | unix/x0vncserver/PollingManager.cxx | 2 | ||||
-rw-r--r-- | unix/x0vncserver/PollingManager.h | 8 | ||||
-rw-r--r-- | unix/x0vncserver/XPixelBuffer.h | 10 |
5 files changed, 15 insertions, 17 deletions
diff --git a/unix/x0vncserver/Geometry.cxx b/unix/x0vncserver/Geometry.cxx index adc72c34..48c18426 100644 --- a/unix/x0vncserver/Geometry.cxx +++ b/unix/x0vncserver/Geometry.cxx @@ -23,6 +23,8 @@ #include <rfb/LogWriter.h> #include <x0vncserver/Geometry.h> +using namespace rfb; + static LogWriter vlog("Geometry"); StringParameter Geometry::m_geometryParam("Geometry", diff --git a/unix/x0vncserver/Geometry.h b/unix/x0vncserver/Geometry.h index 9caeebae..98bafb24 100644 --- a/unix/x0vncserver/Geometry.h +++ b/unix/x0vncserver/Geometry.h @@ -26,8 +26,6 @@ #include <rfb/Rect.h> #include <rfb/Configuration.h> -using namespace rfb; - class Geometry { public: @@ -43,18 +41,18 @@ public: int offsetTop() const { return m_rect.tl.y; } // Return the same information as a Rect structure. - const Rect& getRect() const { return m_rect; } + const rfb::Rect& getRect() const { return m_rect; } protected: // Parse a string, extract size and coordinates, // and return that rectangle clipped to m_rect. - Rect parseString(const char *arg) const; + rfb::Rect parseString(const char *arg) const; - static StringParameter m_geometryParam; + static rfb::StringParameter m_geometryParam; int m_fullWidth; int m_fullHeight; - Rect m_rect; + rfb::Rect m_rect; }; #endif // __GEOMETRY_H__ diff --git a/unix/x0vncserver/PollingManager.cxx b/unix/x0vncserver/PollingManager.cxx index 3a040e23..d7f6f46f 100644 --- a/unix/x0vncserver/PollingManager.cxx +++ b/unix/x0vncserver/PollingManager.cxx @@ -31,6 +31,8 @@ #include <x0vncserver/PollingManager.h> +using namespace rfb; + static LogWriter vlog("PollingMgr"); const int PollingManager::m_pollingOrder[32] = { diff --git a/unix/x0vncserver/PollingManager.h b/unix/x0vncserver/PollingManager.h index e106f790..5025fa54 100644 --- a/unix/x0vncserver/PollingManager.h +++ b/unix/x0vncserver/PollingManager.h @@ -32,8 +32,6 @@ #include <x0vncserver/TimeMillis.h> #endif -using namespace rfb; - class PollingManager { public: @@ -42,12 +40,12 @@ public: int offsetLeft = 0, int offsetTop = 0); virtual ~PollingManager(); - void poll(VNCServer *server); + void poll(rfb::VNCServer *server); protected: // Screen polling. Returns true if some changes were detected. - bool pollScreen(VNCServer *server); + bool pollScreen(rfb::VNCServer *server); Display *m_dpy; @@ -85,7 +83,7 @@ private: int checkRow(int x, int y, int w); int checkColumn(int x, int y, int h, bool *pChangeFlags); - int sendChanges(VNCServer *server) const; + int sendChanges(rfb::VNCServer *server) const; // Check neighboring tiles and update m_changeFlags[]. void checkNeighbors(); diff --git a/unix/x0vncserver/XPixelBuffer.h b/unix/x0vncserver/XPixelBuffer.h index da031615..18c85fe2 100644 --- a/unix/x0vncserver/XPixelBuffer.h +++ b/unix/x0vncserver/XPixelBuffer.h @@ -28,23 +28,21 @@ #include <x0vncserver/Image.h> #include <x0vncserver/PollingManager.h> -using namespace rfb; - // // XPixelBuffer is an Image-based implementation of FullFramePixelBuffer. // -class XPixelBuffer : public FullFramePixelBuffer +class XPixelBuffer : public rfb::FullFramePixelBuffer { public: - XPixelBuffer(Display *dpy, ImageFactory &factory, const Rect &rect); + XPixelBuffer(Display *dpy, ImageFactory &factory, const rfb::Rect &rect); virtual ~XPixelBuffer(); // Provide access to the underlying Image object. const Image *getImage() const { return m_image; } // Detect changed pixels, notify the server. - inline void poll(VNCServer *server) { m_poller->poll(server); } + inline void poll(rfb::VNCServer *server) { m_poller->poll(server); } // Override PixelBuffer::grabRegion(). virtual void grabRegion(const rfb::Region& region); @@ -59,7 +57,7 @@ protected: // Copy pixels from the screen to the pixel buffer, // for the specified rectangular area of the buffer. - inline void grabRect(const Rect &r) { + inline void grabRect(const rfb::Rect &r) { m_image->get(DefaultRootWindow(m_dpy), m_offsetLeft + r.tl.x, m_offsetTop + r.tl.y, r.width(), r.height(), r.tl.x, r.tl.y); |