]> source.dussan.org Git - tigervnc.git/commitdiff
rfb: Fix inheritance in CMsgWriter
authorSteve Kondik <shade@chemlab.org>
Sat, 8 Jul 2017 09:04:41 +0000 (02:04 -0700)
committerSteve Kondik <shade@chemlab.org>
Sat, 8 Jul 2017 09:28:12 +0000 (02:28 -0700)
InputHandler declares the second parameter of clientCutText
as an int.

Fixes:

/home/shade/dev/tigervnc/common/rfb/CMsgWriter.h:60:18: error: 'rfb::CMsgWriter::clientCutText' hides overloaded virtual function [-Werror,-Woverloaded-virtual]
    virtual void clientCutText(const char* str, rdr::U32 len);
                 ^
/home/shade/dev/tigervnc/common/rfb/InputHandler.h:36:18: note: hidden overloaded virtual function 'rfb::InputHandler::clientCutText' declared here: type mismatch at 2nd parameter ('int' vs 'rdr::U32' (aka 'unsigned int'))
    virtual void clientCutText(const char* str, int len) {}
                 ^

common/rfb/CMsgWriter.cxx
common/rfb/CMsgWriter.h

index 8576d8f1245750a740ff78910c203164a17cd985..2142d5148a03240ced62bdbc6879d9be79866644 100644 (file)
@@ -239,7 +239,7 @@ void CMsgWriter::pointerEvent(const Point& pos, int buttonMask)
 }
 
 
-void CMsgWriter::clientCutText(const char* str, rdr::U32 len)
+void CMsgWriter::clientCutText(const char* str, int len)
 {
   startMsg(msgTypeClientCutText);
   os->pad(3);
index f9de72f31fcbf4596ed2723874bf5aab6c27b8e4..858bc15dd3aaf8c7311cfcee679f4fe69221c5c7 100644 (file)
@@ -57,7 +57,7 @@ namespace rfb {
 
     virtual void keyEvent(rdr::U32 key, bool down);
     virtual void pointerEvent(const Point& pos, int buttonMask);
-    virtual void clientCutText(const char* str, rdr::U32 len);
+    virtual void clientCutText(const char* str, int len);
 
   protected:
     void startMsg(int type);