[dasher] Trivial fix so Chinese will compile - ConversionNodes are still unhappy.
- From: Patrick Welche <pwelche src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [dasher] Trivial fix so Chinese will compile - ConversionNodes are still unhappy.
- Date: Sat, 15 Aug 2009 14:24:08 +0000 (UTC)
commit c0a60eed15898efd24d66324d820137bb225f31b
Author: Patrick Welche <prlw1 cam ac uk>
Date: Fri Aug 14 21:32:12 2009 +0200
Trivial fix so Chinese will compile - ConversionNodes are still unhappy.
ChangeLog | 5 +++++
Src/DasherCore/Alphabet/Alphabet.cpp | 24 +++++++++++++-----------
Src/DasherCore/Alphabet/Alphabet.h | 2 +-
Src/DasherCore/ButtonMode.cpp | 2 +-
Src/DasherCore/CompassMode.cpp | 2 +-
Src/DasherCore/ConversionHelper.h | 4 ++--
Src/DasherCore/ConversionManagerFactory.cpp | 2 +-
Src/DasherCore/ConversionManagerFactory.h | 2 +-
Src/DasherCore/MandarinAlphMgr.h | 4 ++--
Src/DasherCore/PinYinConversionHelper.cpp | 2 +-
10 files changed, 28 insertions(+), 21 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 0c0b276..92ae7c6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-08-14 Patrick Welche <prlw1 cam ac uk>
+
+ * Trivial fix so Chinese will compile - ConversionNodes are still
+ unhappy.
+
2009-08-11 Alan Lawrence <acl33 inf phy cam ac uk>
* Split DasherButtons into one class per style; add option for scanning menu
diff --git a/Src/DasherCore/Alphabet/Alphabet.cpp b/Src/DasherCore/Alphabet/Alphabet.cpp
index 53516ca..bce8772 100644
--- a/Src/DasherCore/Alphabet/Alphabet.cpp
+++ b/Src/DasherCore/Alphabet/Alphabet.cpp
@@ -167,16 +167,18 @@ void CAlphabet::GetSymbols(std::vector<symbol> &symbols, std::istream &in) const
in >> skip;
}
else
- {
- if (len == 1) {
- in.ignore(1);
- sym = TextMap.GetSingleChar(ch);
- }
- else {
- in.read(utfchar, len);
- utfchar[len] = '\0';
- sym = TextMap.Get(string(utfchar));
- }
+ {
+ if (len == 1)
+ {
+ in.ignore(1);
+ sym = TextMap.GetSingleChar(ch);
+ }
+ else
+ {
+ in.read(utfchar, len);
+ utfchar[len] = '\0';
+ sym = TextMap.Get(string(utfchar));
+ }
symbols.push_back(sym);
}
ch = in.peek();
@@ -214,7 +216,7 @@ void CAlphabet::GetSymbols(std::vector<symbol>& Symbols, std::string& Input) con
CurSymbol = TextMap.Get(Tmp);
if(CurSymbol != 0)
- Symbols->push_back(CurSymbol);
+ Symbols.push_back(CurSymbol);
}
}
diff --git a/Src/DasherCore/Alphabet/Alphabet.h b/Src/DasherCore/Alphabet/Alphabet.h
index 52b3b8f..81298df 100644
--- a/Src/DasherCore/Alphabet/Alphabet.h
+++ b/Src/DasherCore/Alphabet/Alphabet.h
@@ -109,7 +109,7 @@ namespace Dasher {
// is not necessarily reversible by repeated use of GetText. Some text
// may not be recognised and so discarded. }}}
- void GetSymbols(std::vector<symbol> &Symbols, std::string& Input, bool IsMore) const;
+ void GetSymbols(std::vector<symbol> &Symbols, std::string &Input) const;
void GetSymbols(std::vector<symbol> &symbols, std::istream &in) const;
void Trace() const; // diagnostic
diff --git a/Src/DasherCore/ButtonMode.cpp b/Src/DasherCore/ButtonMode.cpp
index 23b6a8e..9bc5445 100644
--- a/Src/DasherCore/ButtonMode.cpp
+++ b/Src/DasherCore/ButtonMode.cpp
@@ -213,4 +213,4 @@ bool CButtonMode::GetSettings(SModuleSettings **pSettings, int *iCount) {
*iCount = sizeof(sSettings) / sizeof(SModuleSettings);
return true;
-};
\ No newline at end of file
+};
diff --git a/Src/DasherCore/CompassMode.cpp b/Src/DasherCore/CompassMode.cpp
index f6b5ccb..f40223e 100644
--- a/Src/DasherCore/CompassMode.cpp
+++ b/Src/DasherCore/CompassMode.cpp
@@ -139,4 +139,4 @@ bool CCompassMode::GetSettings(SModuleSettings **pSettings, int *iCount) {
*iCount = sizeof(sSettings) / sizeof(SModuleSettings);
return true;
-};
\ No newline at end of file
+};
diff --git a/Src/DasherCore/ConversionHelper.h b/Src/DasherCore/ConversionHelper.h
index 59be54f..9e4efd7 100644
--- a/Src/DasherCore/ConversionHelper.h
+++ b/Src/DasherCore/ConversionHelper.h
@@ -108,7 +108,7 @@ namespace Dasher{
/// implementation assigns decending probabilities in a power law
/// fashion (so assumes ordering), but specific subclasses are
/// free to implement their own behaviour. The only restriction is
- /// that sizes should be posivive and sum to the appropriate
+ /// that sizes should be positive and sum to the appropriate
/// normalisation constant
///
@@ -120,7 +120,7 @@ namespace Dasher{
virtual void PopulateChildren( CDasherNode *pNode );
- virtual void SetFlag(CDasherNode *pNode, int iFlag, bool bValue);
+ virtual void SetFlag(CDasherNode *pNode, int iFlag, bool bValue);
private:
diff --git a/Src/DasherCore/ConversionManagerFactory.cpp b/Src/DasherCore/ConversionManagerFactory.cpp
index 13d3a50..ea9aaa7 100644
--- a/Src/DasherCore/ConversionManagerFactory.cpp
+++ b/Src/DasherCore/ConversionManagerFactory.cpp
@@ -42,7 +42,7 @@ CDasherNode *CConversionManagerFactory::GetRoot(CDasherNode *pParent, int iLower
}
CConversionManagerFactory::~CConversionManagerFactory() {
- m_pMgr->Unref();
+ if (m_pMgr) m_pMgr->Unref();
}
// TODO: Japanese/Chinese are currently disabled in Win32 - see 'exclude from build' on individual files' property pages, plus preprocessor defines
diff --git a/Src/DasherCore/ConversionManagerFactory.h b/Src/DasherCore/ConversionManagerFactory.h
index 11bdce4..a25d197 100644
--- a/Src/DasherCore/ConversionManagerFactory.h
+++ b/Src/DasherCore/ConversionManagerFactory.h
@@ -3,7 +3,7 @@
#include "ConversionManager.h"
#include "LanguageModelling/LanguageModel.h" // Urgh - we really shouldn't need to know about language models here
-#include "alphabet/AlphIO.h"
+#include "Alphabet/AlphIO.h"
#include <map>
diff --git a/Src/DasherCore/MandarinAlphMgr.h b/Src/DasherCore/MandarinAlphMgr.h
index f247c00..29dab37 100644
--- a/Src/DasherCore/MandarinAlphMgr.h
+++ b/Src/DasherCore/MandarinAlphMgr.h
@@ -46,8 +46,8 @@ namespace Dasher {
virtual void SetFlag(CDasherNode *pNode, int iFlag, bool bValue);
protected:
- virtual CDasherNode *CreateSymbolNode(CDasherNode *pParent, symbol iSymbol, unsigned int iLbnd, unsigned int iHbnd, symbol iExistingSymbol, CDasherNode *pExistingChild);
- virtual CLanguageModel::Context CreateSymbolContext(SAlphabetData *pParentData, symbol iSymbol);
+ virtual CDasherNode *CreateSymbolNode(CDasherNode *pParent, symbol iSymbol, unsigned int iLbnd, unsigned int iHbnd, symbol iExistingSymbol, CDasherNode *pExistingChild);
+ virtual CLanguageModel::Context CreateSymbolContext(SAlphabetData *pParentData, symbol iSymbol);
};
/// @}
diff --git a/Src/DasherCore/PinYinConversionHelper.cpp b/Src/DasherCore/PinYinConversionHelper.cpp
index 5f6114b..ffbe8e3 100644
--- a/Src/DasherCore/PinYinConversionHelper.cpp
+++ b/Src/DasherCore/PinYinConversionHelper.cpp
@@ -5,7 +5,7 @@
#include "LanguageModelling/LanguageModel.h"
#include "LanguageModelling/PPMPYLanguageModel.h"
#include "PinYinConversionHelper.h"
-
+#include "NodeCreationManager.h"
#include "SCENode.h"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]