[dasher: 129/217] Fix more compiler warnings.
- From: Patrick Welche <pwelche src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dasher: 129/217] Fix more compiler warnings.
- Date: Sat, 27 Feb 2016 12:11:10 +0000 (UTC)
commit f95be707530dd74e48dbd72a101a9d57b36c6384
Author: lbaudoin <lbaudoin google com>
Date: Wed Nov 18 23:31:22 2015 -0700
Fix more compiler warnings.
Src/DasherCore/Alphabet/AlphIO.h | 2 +-
Src/DasherCore/Alphabet/AlphabetMap.cpp | 2 +-
Src/DasherCore/ColourIO.h | 3 ++-
Src/DasherCore/ControlManager.cpp | 2 +-
Src/DasherCore/ControlManager.h | 1 +
Src/DasherCore/ConvertingAlphMgr.cpp | 2 +-
Src/DasherCore/DasherInterfaceBase.cpp | 2 +-
Src/DasherCore/DasherModel.cpp | 2 +-
Src/DasherCore/DasherModel.h | 3 ---
Src/DasherCore/DasherNode.cpp | 2 +-
Src/DasherCore/DasherView.cpp | 2 +-
Src/DasherCore/DasherViewSquare.cpp | 8 ++++++++
Src/DasherCore/DynamicFilter.cpp | 2 +-
Src/DasherCore/DynamicFilter.h | 3 ---
.../LanguageModelling/PPMLanguageModel.cpp | 2 +-
.../LanguageModelling/WordLanguageModel.cpp | 2 +-
.../LanguageModelling/WordLanguageModel.h | 1 -
Src/Gtk2/Canvas.h | 20 ++++++++++----------
Src/Gtk2/GnomeSettingsStore.h | 12 ++++++------
Src/Gtk2/Preferences.cpp | 2 +-
Src/Gtk2/dasher_editor.cpp | 4 ----
Src/Gtk2/dasher_main.cpp | 6 +++---
Src/Gtk2/mouse_input.h | 6 +++---
23 files changed, 45 insertions(+), 46 deletions(-)
---
diff --git a/Src/DasherCore/Alphabet/AlphIO.h b/Src/DasherCore/Alphabet/AlphIO.h
index 529df9f..2e305b3 100644
--- a/Src/DasherCore/Alphabet/AlphIO.h
+++ b/Src/DasherCore/Alphabet/AlphIO.h
@@ -55,7 +55,7 @@ public:
/// Parse... methods inherited from Abstract[XML]Parser
CAlphIO(CMessageDisplay *pMsgs);
- ~CAlphIO();
+ virtual ~CAlphIO();
void GetAlphabets(std::vector < std::string > *AlphabetList) const;
std::string GetDefault();
const CAlphInfo *GetInfo(const std::string & AlphID) const;
diff --git a/Src/DasherCore/Alphabet/AlphabetMap.cpp b/Src/DasherCore/Alphabet/AlphabetMap.cpp
index b15b379..adf4d50 100644
--- a/Src/DasherCore/Alphabet/AlphabetMap.cpp
+++ b/Src/DasherCore/Alphabet/AlphabetMap.cpp
@@ -198,7 +198,7 @@ void CAlphabetMap::GetSymbols(std::vector<symbol>& Symbols, const std::string& I
CAlphabetMap::CAlphabetMap(unsigned int InitialTableSize)
:HashTable(InitialTableSize <<1), m_ParagraphSymbol(UNKNOWN_SYMBOL) {
Entries.reserve(InitialTableSize);
-
+ // TODO: fix the code so it works if char is signed.
const int numChars = numeric_limits<char>::max() + 1;
m_pSingleChars = new symbol[numChars];
for (int i = 0; i<numChars; i++) m_pSingleChars[i] = UNKNOWN_SYMBOL;
diff --git a/Src/DasherCore/ColourIO.h b/Src/DasherCore/ColourIO.h
index 1f115ad..bed0710 100644
--- a/Src/DasherCore/ColourIO.h
+++ b/Src/DasherCore/ColourIO.h
@@ -28,7 +28,8 @@ namespace Dasher {
/// in a list.
class Dasher::CColourIO : public AbstractXMLParser {
public:
- // This structure completely describes the characters used in alphabet
+ virtual ~CColourIO() = default;
+ // This structure completely describes the characters used in alphabet
struct ColourInfo {
// Basic information
std::string ColourID;
diff --git a/Src/DasherCore/ControlManager.cpp b/Src/DasherCore/ControlManager.cpp
index 5c20a6c..12112ec 100644
--- a/Src/DasherCore/ControlManager.cpp
+++ b/Src/DasherCore/ControlManager.cpp
@@ -317,7 +317,7 @@ public:
CControlManager::CControlManager(CSettingsUser *pCreateFrom, CNodeCreationManager *pNCManager,
CDasherInterfaceBase *pInterface)
-: CControlParser(pInterface), CControlBase(pCreateFrom, pInterface, pNCManager),
CSettingsObserver(pCreateFrom), m_pSpeech(NULL), m_pCopy(NULL) {
+: CSettingsObserver(pCreateFrom), CControlBase(pCreateFrom, pInterface, pNCManager),
CControlParser(pInterface), m_pSpeech(NULL), m_pCopy(NULL) {
//TODO, used to be able to change label+colour of root/pause/stop from controllabels.xml
// (or, get the root node title "control" from the alphabet!)
m_pSpeech = new SpeechHeader(pInterface);
diff --git a/Src/DasherCore/ControlManager.h b/Src/DasherCore/ControlManager.h
index 9213423..dee835f 100644
--- a/Src/DasherCore/ControlManager.h
+++ b/Src/DasherCore/ControlManager.h
@@ -83,6 +83,7 @@ namespace Dasher {
class Action {
public:
+ virtual ~Action() = default;
virtual void happen(CContNode *pNode) {}
};
class NodeTemplate : public Action {
diff --git a/Src/DasherCore/ConvertingAlphMgr.cpp b/Src/DasherCore/ConvertingAlphMgr.cpp
index ca6e686..54326d5 100644
--- a/Src/DasherCore/ConvertingAlphMgr.cpp
+++ b/Src/DasherCore/ConvertingAlphMgr.cpp
@@ -27,7 +27,7 @@ CConvertingAlphMgr::~CConvertingAlphMgr() {
CDasherNode *CConvertingAlphMgr::CreateSymbolNode(CAlphNode *pParent, symbol iSymbol) {
//int i=m_pAlphabet->iEnd;
if (iSymbol == m_pAlphabet->iEnd) {
- vector<unsigned int> *pCProb(pParent->GetProbInfo());
+ pParent->GetProbInfo();
DASHER_ASSERT(pCProb->size() == m_pAlphabet->iEnd+1);//initial 0, final conversion prob
//this used to be the "CloneAlphContext" method. Why it uses the
diff --git a/Src/DasherCore/DasherInterfaceBase.cpp b/Src/DasherCore/DasherInterfaceBase.cpp
index c79bc22..ab806ca 100644
--- a/Src/DasherCore/DasherInterfaceBase.cpp
+++ b/Src/DasherCore/DasherInterfaceBase.cpp
@@ -85,7 +85,7 @@ static char THIS_FILE[] = __FILE__;
#endif
#endif
-CDasherInterfaceBase::CDasherInterfaceBase(CSettingsStore *pSettingsStore) : CSettingsUser(pSettingsStore),
m_pSettingsStore(pSettingsStore), m_pDasherModel(new CDasherModel()), m_pFramerate(new CFrameRate(this)),
m_pLockLabel(NULL) {
+CDasherInterfaceBase::CDasherInterfaceBase(CSettingsStore *pSettingsStore) : CSettingsUser(pSettingsStore),
m_pDasherModel(new CDasherModel()), m_pFramerate(new CFrameRate(this)), m_pSettingsStore(pSettingsStore),
m_pLockLabel(NULL) {
pSettingsStore->Register(this);
diff --git a/Src/DasherCore/DasherModel.cpp b/Src/DasherCore/DasherModel.cpp
index be9dbaa..c984681 100644
--- a/Src/DasherCore/DasherModel.cpp
+++ b/Src/DasherCore/DasherModel.cpp
@@ -250,7 +250,7 @@ bool CDasherModel::NextScheduledStep()
//pick _child_ covering crosshair...
const myint iWidth(m_Rootmax-m_Rootmin);
- for (CDasherNode::ChildMap::const_iterator it = m_Root->GetChildren().begin(), E =
m_Root->GetChildren().end(); ;) {
+ for (CDasherNode::ChildMap::const_iterator it = m_Root->GetChildren().begin(); ;) {
CDasherNode *pChild(*it);
DASHER_ASSERT(m_Rootmin + ((pChild->Lbnd() * iWidth) / NORMALIZATION) <= ORIGIN_Y);
if (m_Rootmin + ((pChild->Hbnd() * iWidth) / NORMALIZATION) > ORIGIN_Y) {
diff --git a/Src/DasherCore/DasherModel.h b/Src/DasherCore/DasherModel.h
index 3e28920..2c433a8 100644
--- a/Src/DasherCore/DasherModel.h
+++ b/Src/DasherCore/DasherModel.h
@@ -227,9 +227,6 @@ class Dasher::CDasherModel: public Observable<CDasherNode*>, private NoClones
// Model parameters... (cached from settings store)
- // Current maximum bitrate (ie zoom at far rhs).
- double m_dMaxRate;
-
// Whether characters entered by alphabet manager are expected to
// require conversion.
// TODO: Need to rethink this at some point.
diff --git a/Src/DasherCore/DasherNode.cpp b/Src/DasherCore/DasherNode.cpp
index 28023c5..899641f 100644
--- a/Src/DasherCore/DasherNode.cpp
+++ b/Src/DasherCore/DasherNode.cpp
@@ -43,7 +43,7 @@ int Dasher::currentNumNodeObjects() {return iNumNodes;}
//TODO this used to be inline - should we make it so again?
CDasherNode::CDasherNode(int iOffset, int iColour, CDasherScreen::Label *pLabel)
-: m_pParent(NULL), m_iFlags(DEFAULT_FLAGS), onlyChildRendered(NULL), m_iLbnd(0),
m_iHbnd(CDasherModel::NORMALIZATION), m_iOffset(iOffset), m_iColour(iColour), m_pLabel(pLabel) {
+: onlyChildRendered(NULL), m_iLbnd(0), m_iHbnd(CDasherModel::NORMALIZATION), m_pParent(NULL),
m_iFlags(DEFAULT_FLAGS), m_iOffset(iOffset), m_iColour(iColour), m_pLabel(pLabel) {
iNumNodes++;
}
diff --git a/Src/DasherCore/DasherView.cpp b/Src/DasherCore/DasherView.cpp
index 9d582e6..ab8e0db 100644
--- a/Src/DasherCore/DasherView.cpp
+++ b/Src/DasherCore/DasherView.cpp
@@ -39,7 +39,7 @@ static char THIS_FILE[] = __FILE__;
/////////////////////////////////////////////////////////////////////////////
CDasherView::CDasherView(CDasherScreen *DasherScreen, Opts::ScreenOrientations orient)
- : m_pScreen(DasherScreen), m_Orientation(orient) {
+ : m_Orientation(orient), m_pScreen(DasherScreen) {
}
/////////////////////////////////////////////////////////////////////////////
diff --git a/Src/DasherCore/DasherViewSquare.cpp b/Src/DasherCore/DasherViewSquare.cpp
index 7da9a61..bd91994 100644
--- a/Src/DasherCore/DasherViewSquare.cpp
+++ b/Src/DasherCore/DasherViewSquare.cpp
@@ -234,6 +234,8 @@ void CDasherViewSquare::DoDelayedText(CTextString *pText) {
}
break;
}
+ default:
+ break;
}
delete pText;
}
@@ -824,6 +826,8 @@ void CDasherViewSquare::Screen2Dasher(screenint iInputX, screenint iInputY, myin
iDasherX = myint( ( iInputY ) * SCALE_FACTOR / iScaleFactorX);
iDasherY = myint(CDasherModel::MAX_Y / 2 + ( iInputX - iScreenWidth / 2 ) * SCALE_FACTOR /
iScaleFactorY);
break;
+ default:
+ break;
}
iDasherX = ixmap(iDasherX);
@@ -995,6 +999,8 @@ void CDasherViewSquare::Dasher2Screen(myint iDasherX, myint iDasherY, screenint
CustomIDivScaleFactor(( iDasherY - CDasherModel::MAX_Y/2 ) * iScaleFactorY));
iScreenY = screenint(CustomIDivScaleFactor( iDasherX * iScaleFactorX ));
break;
+ default:
+ break;
}
}
@@ -1095,6 +1101,8 @@ void CDasherViewSquare::VisibleRegion( myint &iDasherMinX, myint &iDasherMinY, m
Screen2Dasher(0,0,m_iDasherMinX,m_iDasherMinY);
Screen2Dasher(Screen()->GetWidth(),Screen()->GetHeight(),m_iDasherMaxX,m_iDasherMaxY);
break;
+ default:
+ break;
}
m_bVisibleRegionValid = true;
diff --git a/Src/DasherCore/DynamicFilter.cpp b/Src/DasherCore/DynamicFilter.cpp
index d86960f..94f6f11 100644
--- a/Src/DasherCore/DynamicFilter.cpp
+++ b/Src/DasherCore/DynamicFilter.cpp
@@ -25,7 +25,7 @@ using namespace Dasher;
CDynamicFilter::CDynamicFilter(CSettingsUser *pCreator, CDasherInterfaceBase *pInterface, CFrameRate
*pFramerate, ModuleID_t iID, const char *szName)
: CInputFilter(pInterface, iID, szName), CSettingsUser(pCreator),
- m_bPaused(true), m_pFramerate(pFramerate), m_dLastBits(-1) {
+ m_pFramerate(pFramerate), m_bPaused(true) {
}
bool CDynamicFilter::OneStepTowards(CDasherModel *pModel, myint X, myint Y, unsigned long iTime, double
dSpeedMul) {
diff --git a/Src/DasherCore/DynamicFilter.h b/Src/DasherCore/DynamicFilter.h
index 0f5c06a..84a6369 100644
--- a/Src/DasherCore/DynamicFilter.h
+++ b/Src/DasherCore/DynamicFilter.h
@@ -72,9 +72,6 @@ class CDynamicFilter : public CInputFilter, public CSettingsUser {
//Time at which Unpause() was called, used for Slow Start.
unsigned long m_iStartTime;
bool m_bPaused;
- //Number of bits (we allowed) to be entered in previous frame - to cache exp()
- double m_dLastBits;
- double m_iLastMinSize;
};
}
#endif
diff --git a/Src/DasherCore/LanguageModelling/PPMLanguageModel.cpp
b/Src/DasherCore/LanguageModelling/PPMLanguageModel.cpp
index 6435bf0..261c87d 100644
--- a/Src/DasherCore/LanguageModelling/PPMLanguageModel.cpp
+++ b/Src/DasherCore/LanguageModelling/PPMLanguageModel.cpp
@@ -31,7 +31,7 @@ static char THIS_FILE[] = __FILE__;
/////////////////////////////////////////////////////////////////////
CAbstractPPM::CAbstractPPM(CSettingsUser *pCreator, int iNumSyms, CPPMnode *pRoot, int iMaxOrder)
-: CSettingsUser(pCreator), CLanguageModel(iNumSyms), m_pRoot(pRoot), m_iMaxOrder(iMaxOrder<0 ?
GetLongParameter(LP_LM_MAX_ORDER) : iMaxOrder), bUpdateExclusion( GetLongParameter(LP_LM_UPDATE_EXCLUSION)!=0
), m_ContextAlloc(1024) {
+: CLanguageModel(iNumSyms), CSettingsUser(pCreator), m_pRoot(pRoot), m_iMaxOrder(iMaxOrder<0 ?
GetLongParameter(LP_LM_MAX_ORDER) : iMaxOrder), bUpdateExclusion( GetLongParameter(LP_LM_UPDATE_EXCLUSION)!=0
), m_ContextAlloc(1024) {
m_pRootContext = m_ContextAlloc.Alloc();
m_pRootContext->head = m_pRoot;
m_pRootContext->order = 0;
diff --git a/Src/DasherCore/LanguageModelling/WordLanguageModel.cpp
b/Src/DasherCore/LanguageModelling/WordLanguageModel.cpp
index 9baa5f4..0d65b03 100644
--- a/Src/DasherCore/LanguageModelling/WordLanguageModel.cpp
+++ b/Src/DasherCore/LanguageModelling/WordLanguageModel.cpp
@@ -123,7 +123,7 @@ CWordLanguageModel::CWordnode * CWordLanguageModel::AddSymbolToNode(CWordnode *p
CWordLanguageModel::CWordLanguageModel(CSettingsUser *pCreator,
const CAlphInfo *pAlph, const CAlphabetMap *pAlphMap)
- :CLanguageModel(pAlph->iEnd-1), CSettingsUser(pCreator), m_pAlphMap(pAlphMap),
m_iSpaceSymbol(pAlph->GetSpaceSymbol()), NodesAllocated(0),
+ :CLanguageModel(pAlph->iEnd-1), CSettingsUser(pCreator), m_iSpaceSymbol(pAlph->GetSpaceSymbol()),
NodesAllocated(0),
max_order(2), m_NodeAlloc(8192), m_ContextAlloc(1024) {
// Construct a root node for the trie
diff --git a/Src/DasherCore/LanguageModelling/WordLanguageModel.h
b/Src/DasherCore/LanguageModelling/WordLanguageModel.h
index df2923f..5ba0787 100644
--- a/Src/DasherCore/LanguageModelling/WordLanguageModel.h
+++ b/Src/DasherCore/LanguageModelling/WordLanguageModel.h
@@ -114,7 +114,6 @@ namespace Dasher {
int lookup_word(const std::string & w);
int lookup_word_const(const std::string & w) const;
- const CAlphabetMap *m_pAlphMap;
const int m_iSpaceSymbol;
CWordContext *m_rootcontext;
diff --git a/Src/Gtk2/Canvas.h b/Src/Gtk2/Canvas.h
index e505640..a2d1021 100644
--- a/Src/Gtk2/Canvas.h
+++ b/Src/Gtk2/Canvas.h
@@ -92,7 +92,7 @@ public:
void SetFont(const std::string &strName);
///Make a label for use with this screen; caches Pango layout information inside it.
- CDasherScreen::Label *MakeLabel(const std::string &strText, unsigned int iWrapSize=0);
+ CDasherScreen::Label *MakeLabel(const std::string &strText, unsigned int iWrapSize=0) override;
///
/// Return the physical extent of a given string being rendered at a given size.
@@ -102,7 +102,7 @@ public:
/// \param Size Size at which the string will be rendered (units?)
///
- std::pair<screenint,screenint> TextSize(CDasherScreen::Label *label, unsigned int Size);
+ std::pair<screenint,screenint> TextSize(CDasherScreen::Label *label, unsigned int Size) override;
///
/// Draw a text string
@@ -112,7 +112,7 @@ public:
/// \param Size The size at which to render the rectangle (units?)
///
- void DrawString(CDasherScreen::Label *label, screenint x1, screenint y1, unsigned int Size, int iColor);
+ void DrawString(CDasherScreen::Label *label, screenint x1, screenint y1, unsigned int Size, int iColor)
override;
///
/// Draw a rectangle
@@ -124,9 +124,9 @@ public:
/// \param iOutlineColour Colour to draw the outline (-1 = use default)
/// \param iThickness line width of outline (<=0 = don't outline)
///
- void DrawRectangle(screenint x1, screenint y1, screenint x2, screenint y2, int Color, int iOutlineColour,
int iThickness);
+ void DrawRectangle(screenint x1, screenint y1, screenint x2, screenint y2, int Color, int iOutlineColour,
int iThickness) override;
- void DrawCircle(screenint iCX, screenint iCY, screenint iR, int iFillColour, int iLineColour, int
iThickness);
+ void DrawCircle(screenint iCX, screenint iCY, screenint iR, int iFillColour, int iLineColour, int
iThickness) override;
///
/// Send a marker to indicate phases of the redraw process. This is
@@ -139,7 +139,7 @@ public:
/// \param iMarker ID of the marker being sent.
///
- void SendMarker(int iMarker);
+ void SendMarker(int iMarker) override;
///
/// Draw a coloured polyline
@@ -148,7 +148,7 @@ public:
/// \param Colour Colour with which to draw the line
///
- void Polyline(point * Points, int Number, int iWidth, int Colour);
+ void Polyline(point * Points, int Number, int iWidth, int Colour) override;
///
/// Draw a closed polygon (linking last vertex back to first)
@@ -157,7 +157,7 @@ public:
/// @param iWidth ...and line thickness; -1 => don't draw outline
///
- void Polygon(point *Points, int Number, int fillColour, int outlineColour, int iWidth);
+ void Polygon(point *Points, int Number, int fillColour, int outlineColour, int iWidth) override;
///
/// Blank the diplay
@@ -169,14 +169,14 @@ public:
/// Marks the end of the display process - at this point the offscreen buffer is copied onscreen.
///
- void Display();
+ void Display() override;
///
/// Update the colour definitions
/// \param Colours New colours to use
///
- void SetColourScheme(const Dasher::CColourIO::ColourInfo *pColourScheme);
+ void SetColourScheme(const Dasher::CColourIO::ColourInfo *pColourScheme) override;
///
/// Gets the location and size of our canvas.
diff --git a/Src/Gtk2/GnomeSettingsStore.h b/Src/Gtk2/GnomeSettingsStore.h
index fa5eca9..f8c3415 100644
--- a/Src/Gtk2/GnomeSettingsStore.h
+++ b/Src/Gtk2/GnomeSettingsStore.h
@@ -25,13 +25,13 @@ public:
~CGnomeSettingsStore();
private:
- bool LoadSetting(const std::string & Key, bool * Value);
- bool LoadSetting(const std::string & Key, long * Value);
- bool LoadSetting(const std::string & Key, std::string * Value);
+ bool LoadSetting(const std::string & Key, bool * Value) override;
+ bool LoadSetting(const std::string & Key, long * Value) override;
+ bool LoadSetting(const std::string & Key, std::string * Value) override;
- void SaveSetting(const std::string & Key, bool Value);
- void SaveSetting(const std::string & Key, long Value);
- void SaveSetting(const std::string & Key, const std::string & Value);
+ void SaveSetting(const std::string & Key, bool Value) override;
+ void SaveSetting(const std::string & Key, long Value) override;
+ void SaveSetting(const std::string & Key, const std::string & Value) override;
#ifdef WITH_GCONF
GConfClient *the_gconf_client;
diff --git a/Src/Gtk2/Preferences.cpp b/Src/Gtk2/Preferences.cpp
index c165398..62d4351 100644
--- a/Src/Gtk2/Preferences.cpp
+++ b/Src/Gtk2/Preferences.cpp
@@ -704,7 +704,7 @@ extern "C" void orientation(GtkRadioButton *widget, gpointer user_data) {
return;
GtkToggleButton *pButton = GTK_TOGGLE_BUTTON(widget);
- Dasher::Opts::ScreenOrientations orient;
+ Dasher::Opts::ScreenOrientations orient = Dasher::Opts::AlphabetDefault;
if (pButton == pPrivate->pAlphOrient) {
orient = Dasher::Opts::AlphabetDefault;
} else if (pButton == pPrivate->pLRButton) {
diff --git a/Src/Gtk2/dasher_editor.cpp b/Src/Gtk2/dasher_editor.cpp
index 715b744..99ec3b2 100644
--- a/Src/Gtk2/dasher_editor.cpp
+++ b/Src/Gtk2/dasher_editor.cpp
@@ -59,8 +59,6 @@ static gboolean dasher_editor_internal_unix_vfs_save_file(DasherEditor *pSelf, c
static void dasher_editor_internal_set_filename(DasherEditor *pSelf, const gchar *szFilename);
-static void dasher_editor_internal_edit_protect(DasherEditor *pSelf);
-
static void dasher_editor_internal_new_buffer(DasherEditor *pSelf, const gchar *szFilename);
static void dasher_editor_internal_generate_filename(DasherEditor *pSelf);
@@ -650,8 +648,6 @@ GtkTextBuffer *dasher_editor_game_text_buffer(DasherEditor *pSelf) {
gboolean
dasher_editor_command(DasherEditor *pSelf, const gchar *szCommand) {
- DasherEditorPrivate *pPrivate = DASHER_EDITOR_GET_PRIVATE(pSelf);
-
if(!strcmp(szCommand, "action_new")) { //select_new_file
dasher_editor_internal_command_new(pSelf);
return TRUE;
diff --git a/Src/Gtk2/dasher_main.cpp b/Src/Gtk2/dasher_main.cpp
index c6d5bd4..e48a97e 100644
--- a/Src/Gtk2/dasher_main.cpp
+++ b/Src/Gtk2/dasher_main.cpp
@@ -583,7 +583,7 @@ void dasher_main_command_toggle_game_mode(DasherMain *pSelf) {
GTK_MESSAGE_OTHER, GTK_BUTTONS_NONE,
_("Welcome to Dasher Game Mode! Game Mode is a fun way to practice
entering text in Dasher. Please select a training text to play with:"));
- GtkWidget *pDefaultButton = gtk_dialog_add_button(GTK_DIALOG(pDialog), _("Use Default"),
GTK_RESPONSE_ACCEPT);
+ gtk_dialog_add_button(GTK_DIALOG(pDialog), _("Use Default"), GTK_RESPONSE_ACCEPT);
GtkWidget *pFileButton = gtk_dialog_add_button(GTK_DIALOG(pDialog), _("Choose File..."), 2);
gtk_dialog_add_button(GTK_DIALOG(pDialog), _("Cancel"), GTK_RESPONSE_REJECT);
@@ -610,8 +610,8 @@ void dasher_main_command_toggle_game_mode(DasherMain *pSelf) {
GTK_MESSAGE_OTHER, GTK_BUTTONS_NONE,
_("Are you sure you wish to turn off game mode? All unsaved
changes will be lost."));
- GtkWidget *pNoButton = gtk_dialog_add_button(GTK_DIALOG(pDialog), _("No"), GTK_RESPONSE_REJECT);
- GtkWidget *pYesButton = gtk_dialog_add_button(GTK_DIALOG(pDialog), _("Yes"), GTK_RESPONSE_ACCEPT);
+ gtk_dialog_add_button(GTK_DIALOG(pDialog), _("No"), GTK_RESPONSE_REJECT);
+ gtk_dialog_add_button(GTK_DIALOG(pDialog), _("Yes"), GTK_RESPONSE_ACCEPT);
if(gtk_dialog_run(GTK_DIALOG(pDialog))==GTK_RESPONSE_ACCEPT) {
gtk_dasher_control_set_game_mode(GTK_DASHER_CONTROL(pPrivate->pDasherWidget), false);
diff --git a/Src/Gtk2/mouse_input.h b/Src/Gtk2/mouse_input.h
index 1584cad..6e47425 100644
--- a/Src/Gtk2/mouse_input.h
+++ b/Src/Gtk2/mouse_input.h
@@ -60,7 +60,7 @@ public:
// values were in screen coordinates or 1 if the values were in
// Dasher coordinates.
- virtual bool GetDasherCoords(myint &iDasherX, myint &iDasherY, CDasherView *pView) {
+ virtual bool GetDasherCoords(myint &iDasherX, myint &iDasherY, CDasherView *pView) override {
iDasherX=0;
iDasherY = m_iY;
return true;
@@ -78,13 +78,13 @@ public:
m_iY = (iY - m_iOffset) * 4096 / iScale + 2048;
};
- void KeyDown(int iTime, int iId) {
+ void KeyDown(unsigned long iTime, int iId) override {
if(iId == 10) {
m_iOffset = m_iRealY;
}
};
- bool GetSettings(SModuleSettings **pSettings, int *iCount) {
+ bool GetSettings(SModuleSettings **pSettings, int *iCount) override {
*pSettings = sSettings;
*iCount = sizeof(sSettings) / sizeof(SModuleSettings);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]