aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2015-11-10 12:58:49 +0100
committerPierre Ossman <ossman@cendio.se>2015-11-27 10:56:41 +0100
commitf22d350e75e798863927c54031fc5dc5e84ae3c4 (patch)
tree24bb9c9e94410e7e81f0509f2d8f6719b3cd00ec /common
parent9f273e9cd806288a37d1aae2d9f9ddae7262b8e5 (diff)
downloadtigervnc-f22d350e75e798863927c54031fc5dc5e84ae3c4.tar.gz
tigervnc-f22d350e75e798863927c54031fc5dc5e84ae3c4.zip
Make ConnParams useful when const
Diffstat (limited to 'common')
-rw-r--r--common/rfb/ConnParams.cxx2
-rw-r--r--common/rfb/ConnParams.h14
2 files changed, 8 insertions, 8 deletions
diff --git a/common/rfb/ConnParams.cxx b/common/rfb/ConnParams.cxx
index 615f49ae..ab3b884a 100644
--- a/common/rfb/ConnParams.cxx
+++ b/common/rfb/ConnParams.cxx
@@ -99,7 +99,7 @@ void ConnParams::setCursor(const Cursor& other)
memcpy(cursor_.mask.buf, other.mask.buf, cursor_.maskLen());
}
-bool ConnParams::supportsEncoding(rdr::S32 encoding)
+bool ConnParams::supportsEncoding(rdr::S32 encoding) const
{
return encodings_.count(encoding) != 0;
}
diff --git a/common/rfb/ConnParams.h b/common/rfb/ConnParams.h
index 0b8a89cd..9e647baa 100644
--- a/common/rfb/ConnParams.h
+++ b/common/rfb/ConnParams.h
@@ -56,14 +56,14 @@ namespace rfb {
void setVersion(int major, int minor) {
majorVersion = major; minorVersion = minor;
}
- bool isVersion(int major, int minor) {
+ bool isVersion(int major, int minor) const {
return majorVersion == major && minorVersion == minor;
}
- bool beforeVersion(int major, int minor) {
+ bool beforeVersion(int major, int minor) const {
return (majorVersion < major ||
(majorVersion == major && minorVersion < minor));
}
- bool afterVersion(int major, int minor) {
+ bool afterVersion(int major, int minor) const {
return !beforeVersion(major,minor+1);
}
@@ -71,16 +71,16 @@ namespace rfb {
int height;
ScreenSet screenLayout;
- const PixelFormat& pf() { return pf_; }
+ const PixelFormat& pf() const { return pf_; }
void setPF(const PixelFormat& pf);
- const char* name() { return name_; }
+ const char* name() const { return name_; }
void setName(const char* name);
- const Cursor& cursor() { return cursor_; }
+ const Cursor& cursor() const { return cursor_; }
void setCursor(const Cursor& cursor);
- bool supportsEncoding(rdr::S32 encoding);
+ bool supportsEncoding(rdr::S32 encoding) const;
void setEncodings(int nEncodings, const rdr::S32* encodings);