diff --git a/Src/Common/SBTree.h b/Src/Common/SBTree.h index 7ba589bc..ddcb83dd 100644 --- a/Src/Common/SBTree.h +++ b/Src/Common/SBTree.h @@ -7,8 +7,6 @@ * */ -#include - class SBTree { public: SBTree(int iValue); diff --git a/Src/Common/Trace.h b/Src/Common/Trace.h index 000283eb..1fd0d975 100644 --- a/Src/Common/Trace.h +++ b/Src/Common/Trace.h @@ -25,7 +25,6 @@ // removed by the compiler #include -#include void DasherTraceOutput(const char *pszFormat, ...); void DasherTraceOutputImpl(const char *pszFormat, va_list vargs); diff --git a/Src/DasherCore/AbstractXMLParser.cpp b/Src/DasherCore/AbstractXMLParser.cpp index a4e44f5e..8c684755 100644 --- a/Src/DasherCore/AbstractXMLParser.cpp +++ b/Src/DasherCore/AbstractXMLParser.cpp @@ -11,8 +11,6 @@ #include -#include "FileUtils.h" - bool AbstractParser::ParseFile(const std::string& strPath, bool bUser) { std::ifstream in(strPath.c_str(), std::ios::binary); diff --git a/Src/DasherCore/Alphabet/AlphIO.cpp b/Src/DasherCore/Alphabet/AlphIO.cpp index eb89b206..4bce48a4 100644 --- a/Src/DasherCore/Alphabet/AlphIO.cpp +++ b/Src/DasherCore/Alphabet/AlphIO.cpp @@ -25,8 +25,6 @@ #include #include -#include "../ColorIO.h" - using namespace Dasher; CAlphIO::CAlphIO(CMessageDisplay *pMsgs) : AbstractXMLParser(pMsgs) { diff --git a/Src/DasherCore/Alphabet/AlphIO.h b/Src/DasherCore/Alphabet/AlphIO.h index ab28902d..e42f3ed3 100644 --- a/Src/DasherCore/Alphabet/AlphIO.h +++ b/Src/DasherCore/Alphabet/AlphIO.h @@ -28,7 +28,6 @@ #include #include #include -#include namespace Dasher { class CAlphIO; diff --git a/Src/DasherCore/Alphabet/AlphInfo.h b/Src/DasherCore/Alphabet/AlphInfo.h index 61d1b95e..ad590dfb 100644 --- a/Src/DasherCore/Alphabet/AlphInfo.h +++ b/Src/DasherCore/Alphabet/AlphInfo.h @@ -21,16 +21,12 @@ #ifndef __ALPHINFO_H__ #define __ALPHINFO_H__ -#include #include "../DasherTypes.h" -#include "AlphabetMap.h" #include "GroupInfo.h" #include -#include #include -#include // for std::pair #include "Actions.h" diff --git a/Src/DasherCore/AlphabetManager.h b/Src/DasherCore/AlphabetManager.h index 00e0ad79..2dab0125 100644 --- a/Src/DasherCore/AlphabetManager.h +++ b/Src/DasherCore/AlphabetManager.h @@ -21,6 +21,8 @@ #ifndef __alphabetmanager_h__ #define __alphabetmanager_h__ +#include + #include "LanguageModelling/LanguageModel.h" #include "DasherNode.h" #include "NodeManager.h" diff --git a/Src/DasherCore/AlternatingDirectMode.cpp b/Src/DasherCore/AlternatingDirectMode.cpp index 6deb8682..ff2e3262 100644 --- a/Src/DasherCore/AlternatingDirectMode.cpp +++ b/Src/DasherCore/AlternatingDirectMode.cpp @@ -9,7 +9,6 @@ #include #include "DasherInterfaceBase.h" -#include using namespace Dasher; diff --git a/Src/DasherCore/AlternatingDirectMode.h b/Src/DasherCore/AlternatingDirectMode.h index 2b369882..388ff2bb 100644 --- a/Src/DasherCore/AlternatingDirectMode.h +++ b/Src/DasherCore/AlternatingDirectMode.h @@ -5,7 +5,6 @@ #ifndef __ALTERNATING_DIRECT_MODE_H__ #define __ALTERNATING_DIRECT_MODE_H__ -#include "Event.h" #include "DasherButtons.h" namespace Dasher { diff --git a/Src/DasherCore/AutoSpeedControl.cpp b/Src/DasherCore/AutoSpeedControl.cpp index 15f81cba..c8cc1ba9 100644 --- a/Src/DasherCore/AutoSpeedControl.cpp +++ b/Src/DasherCore/AutoSpeedControl.cpp @@ -1,6 +1,7 @@ #include "AutoSpeedControl.h" +#include #include using namespace Dasher; diff --git a/Src/DasherCore/ButtonMode.cpp b/Src/DasherCore/ButtonMode.cpp index f31b2a26..273bafc9 100644 --- a/Src/DasherCore/ButtonMode.cpp +++ b/Src/DasherCore/ButtonMode.cpp @@ -5,10 +5,10 @@ #include "ButtonMode.h" #include +#include #include "DasherScreen.h" #include "DasherInterfaceBase.h" -#include using namespace Dasher; @@ -113,7 +113,7 @@ void CButtonMode::SetupBoxes() double dMaxSize; if(dRatio == 1.0) { - dMaxSize = iDasherY / iForwardBoxes; + dMaxSize = static_cast(iDasherY) / static_cast(iForwardBoxes); } else { if(bEven) diff --git a/Src/DasherCore/ButtonMode.h b/Src/DasherCore/ButtonMode.h index 1c62060c..fe9b2a27 100644 --- a/Src/DasherCore/ButtonMode.h +++ b/Src/DasherCore/ButtonMode.h @@ -5,7 +5,6 @@ #ifndef __BUTTON_MODE_H__ #define __BUTTON_MODE_H__ -#include "Event.h" #include "DasherButtons.h" namespace Dasher { diff --git a/Src/DasherCore/CannaConversionHelper.cpp b/Src/DasherCore/CannaConversionHelper.cpp index 5a55a086..6031b11c 100644 --- a/Src/DasherCore/CannaConversionHelper.cpp +++ b/Src/DasherCore/CannaConversionHelper.cpp @@ -7,6 +7,7 @@ #include #include #include +#include "SCENode.h" #define BUFSIZE 10240 diff --git a/Src/DasherCore/CannaConversionHelper.h b/Src/DasherCore/CannaConversionHelper.h index 53daa5ca..2422aac4 100644 --- a/Src/DasherCore/CannaConversionHelper.h +++ b/Src/DasherCore/CannaConversionHelper.h @@ -6,12 +6,11 @@ #include "ConversionManager.h" #include -#include /// \ingroup Model /// @{ class CCannaConversionHelper : public Dasher::CConversionManager { public: - CCannaConversionHelper(CNodeCreationManager *pNCManager, Dasher::const CAlphInfo *pAlphabet, int Type, int Order); + CCannaConversionHelper(CNodeCreationManager *pNCManager, const Dasher::CAlphInfo *pAlphabet, int Type, int Order); ~CCannaConversionHelper(); virtual bool Convert(const std::string &strSource, SCENode ** pRoot); diff --git a/Src/DasherCore/ClickFilter.cpp b/Src/DasherCore/ClickFilter.cpp index c908b6fa..010f7d55 100644 --- a/Src/DasherCore/ClickFilter.cpp +++ b/Src/DasherCore/ClickFilter.cpp @@ -1,5 +1,6 @@ #include "ClickFilter.h" #include "DasherInterfaceBase.h" +#include using namespace Dasher; diff --git a/Src/DasherCore/ColorPalette.h b/Src/DasherCore/ColorPalette.h index 700efb3f..19a308cc 100644 --- a/Src/DasherCore/ColorPalette.h +++ b/Src/DasherCore/ColorPalette.h @@ -8,11 +8,9 @@ #pragma once -#include "AbstractXMLParser.h" - -#include #include #include +#include namespace Dasher { namespace NamedColor diff --git a/Src/DasherCore/CompassMode.cpp b/Src/DasherCore/CompassMode.cpp index 695f29e0..eacb6fa3 100644 --- a/Src/DasherCore/CompassMode.cpp +++ b/Src/DasherCore/CompassMode.cpp @@ -9,8 +9,6 @@ #include "DasherScreen.h" #include "DasherInterfaceBase.h" -#include - using namespace Dasher; diff --git a/Src/DasherCore/CompassMode.h b/Src/DasherCore/CompassMode.h index 2f54d673..f1fc941c 100644 --- a/Src/DasherCore/CompassMode.h +++ b/Src/DasherCore/CompassMode.h @@ -5,7 +5,6 @@ #ifndef __COMPASS_MODE_H__ #define __COMPASS_MODE_H__ -#include "Event.h" #include "DasherButtons.h" namespace Dasher { diff --git a/Src/DasherCore/ConversionManager.cpp b/Src/DasherCore/ConversionManager.cpp index 50d17928..8a9efffd 100644 --- a/Src/DasherCore/ConversionManager.cpp +++ b/Src/DasherCore/ConversionManager.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include //Note the new implementation in Mandarin Dasher may not be compatible with the previous implementation of Japanese Dasher //Need to reconcile (a small project) diff --git a/Src/DasherCore/ConversionManager.h b/Src/DasherCore/ConversionManager.h index 36ef3288..ff5fca7f 100644 --- a/Src/DasherCore/ConversionManager.h +++ b/Src/DasherCore/ConversionManager.h @@ -21,6 +21,8 @@ #ifndef __conversion_manager_h__ #define __conversion_manager_h__ +#include + #include "DasherTypes.h" #include "LanguageModelling/LanguageModel.h" // Urgh - we really shouldn't need to know about language models here #include "DasherNode.h" diff --git a/Src/DasherCore/CustomColours.cpp b/Src/DasherCore/CustomColours.cpp deleted file mode 100644 index 096f5e2d..00000000 --- a/Src/DasherCore/CustomColours.cpp +++ /dev/null @@ -1,30 +0,0 @@ -// CustomColours.cpp -// -// Copyright (c) 2002 Iain Murray - -#include "../Common/Common.h" - -#include "CustomColours.h" -using namespace Dasher; -using namespace std; - -// Track memory leaks on Windows to the line that new'd the memory -#ifdef _WIN32 -#ifdef _DEBUG -#define DEBUG_NEW new( _NORMAL_BLOCK, THIS_FILE, __LINE__ ) -#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif -#endif - -CCustomColours::CCustomColours(const CColourIO::ColourInfo &ColourInfo) { - m_ColourInfo = &ColourInfo; - - // Add all the colours. - for(unsigned int i = 0; i < ColourInfo.Reds.size(); i++) { // loop colours - m_Red.push_back(ColourInfo.Reds[i]); - m_Green.push_back(ColourInfo.Greens[i]); - m_Blue.push_back(ColourInfo.Blues[i]); - } -} diff --git a/Src/DasherCore/CustomColours.h b/Src/DasherCore/CustomColours.h deleted file mode 100644 index 89a3ea97..00000000 --- a/Src/DasherCore/CustomColours.h +++ /dev/null @@ -1,39 +0,0 @@ -// CustomColours.h -// -// Copyright (c) 2002 Iain Murray - -#ifndef __CustomColours_h__ -#define __CustomColours_h__ - -#include "ColourIO.h" - -namespace Dasher { - class CCustomColours; -} - -/// \ingroup Colours -/// @{ -class Dasher::CCustomColours { - public: - CCustomColours(const CColorIO::ColourInfo & ColourInfo); - int GetNumColours() const { - return m_Red.size(); - } - int GetRed(int colour) const { - return m_Red[colour]; - } - int GetGreen(int colour) const { - return m_Green[colour]; - } - int GetBlue(int colour) const { - return m_Blue[colour]; - } - private: - const CColorIO::ColourInfo * m_ColourInfo; - std::vector m_Red; - std::vector m_Green; - std::vector m_Blue; -}; -/// @} - -#endif /* #ifndef __CustomColours_h__ */ diff --git a/Src/DasherCore/DasherButtons.h b/Src/DasherCore/DasherButtons.h index 92f286f6..f66a73d4 100644 --- a/Src/DasherCore/DasherButtons.h +++ b/Src/DasherCore/DasherButtons.h @@ -5,7 +5,6 @@ #ifndef __DASHER_BUTTONS_H__ #define __DASHER_BUTTONS_H__ -#include "Event.h" #include "InputFilter.h" namespace Dasher { diff --git a/Src/DasherCore/DasherInterfaceBase.cpp b/Src/DasherCore/DasherInterfaceBase.cpp index 471e4aee..e34814ae 100644 --- a/Src/DasherCore/DasherInterfaceBase.cpp +++ b/Src/DasherCore/DasherInterfaceBase.cpp @@ -47,6 +47,7 @@ // STL headers #include +#include // Declare our global file logging object diff --git a/Src/DasherCore/DasherInterfaceBase.h b/Src/DasherCore/DasherInterfaceBase.h index 096f7519..1daa3693 100644 --- a/Src/DasherCore/DasherInterfaceBase.h +++ b/Src/DasherCore/DasherInterfaceBase.h @@ -33,14 +33,11 @@ #include "Messages.h" #include "../Common/NoClones.h" -#include "../Common/ModuleSettings.h" #include "Alphabet/AlphIO.h" -#include "AutoSpeedControl.h" #include "ColorIO.h" #include "InputFilter.h" #include "ModuleManager.h" #include "FrameRate.h" -#include namespace Dasher { class CDasherScreen; diff --git a/Src/DasherCore/DasherModel.cpp b/Src/DasherCore/DasherModel.cpp index 9a74b919..ea4abe7e 100644 --- a/Src/DasherCore/DasherModel.cpp +++ b/Src/DasherCore/DasherModel.cpp @@ -24,6 +24,7 @@ #include "NodeCreationManager.h" #include #include +#include using namespace Dasher; @@ -371,7 +372,7 @@ void CDasherModel::ScheduleOneStep(dasherint y1, dasherint y2, int nSteps, int l // = (MAX_Y-(2*limX)) / (2*limX) * targetRange / (MAX_Y-targetRange) { const dasherint n=targetRange*(MAX_Y-2*limX), d=(MAX_Y-targetRange)*2*limX; - bool bOver=std::max(abs(m1),abs(m2))>std::numeric_limits::max()/n; + bool bOver=std::max(llabs(m1),llabs(m2))>std::numeric_limits::max()/n; if (bOver) { //std::cout << "Overflow in max-speed-limit " << m1 << "," << m2 << " =wd> " << ((m1*n)/d) << "," << ((m2*n)/d); //so do it a harder way, but which uses smaller intermediates: diff --git a/Src/DasherCore/DasherNode.h b/Src/DasherCore/DasherNode.h index 32a44777..62759824 100644 --- a/Src/DasherCore/DasherNode.h +++ b/Src/DasherCore/DasherNode.h @@ -22,7 +22,6 @@ #define __DasherNode_h__ #include "../Common/NoClones.h" -#include "LanguageModelling/LanguageModel.h" //Includes needed for used classes #include "NodeManager.h" #include "Alphabet/AlphabetMap.h" @@ -35,7 +34,6 @@ namespace Dasher { class CDasherInterfaceBase; } #include -#include #include /// \ingroup Model diff --git a/Src/DasherCore/DasherScreen.h b/Src/DasherCore/DasherScreen.h index ccff4e30..d0d6b2a7 100644 --- a/Src/DasherCore/DasherScreen.h +++ b/Src/DasherCore/DasherScreen.h @@ -6,7 +6,7 @@ #define __DasherScreen_h_ #include "DasherTypes.h" -#include "../DasherCore/ColorIO.h" +#include "ColorPalette.h" #include "myassert.h" #include diff --git a/Src/DasherCore/DasherView.cpp b/Src/DasherCore/DasherView.cpp index ac4a215b..02afe692 100644 --- a/Src/DasherCore/DasherView.cpp +++ b/Src/DasherCore/DasherView.cpp @@ -18,9 +18,8 @@ // along with Dasher; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -#include "DasherInput.h" #include "DasherView.h" - +#include using namespace Dasher; diff --git a/Src/DasherCore/DefaultFilter.cpp b/Src/DasherCore/DefaultFilter.cpp index 76b404e0..c46c6709 100644 --- a/Src/DasherCore/DefaultFilter.cpp +++ b/Src/DasherCore/DefaultFilter.cpp @@ -1,6 +1,8 @@ #include "DefaultFilter.h" #include +#include +#include #include "DasherInterfaceBase.h" diff --git a/Src/DasherCore/DemoFilter.cpp b/Src/DasherCore/DemoFilter.cpp index b50e8af7..639af48a 100644 --- a/Src/DasherCore/DemoFilter.cpp +++ b/Src/DasherCore/DemoFilter.cpp @@ -1,6 +1,7 @@ #include "DemoFilter.h" #include +#include #include "DasherInterfaceBase.h" diff --git a/Src/DasherCore/DynamicFilter.cpp b/Src/DasherCore/DynamicFilter.cpp index 64bdaf2a..d9de0b3d 100644 --- a/Src/DasherCore/DynamicFilter.cpp +++ b/Src/DasherCore/DynamicFilter.cpp @@ -20,6 +20,7 @@ #include "DasherInterfaceBase.h" #include "DynamicFilter.h" +#include using namespace Dasher; diff --git a/Src/DasherCore/Event.h b/Src/DasherCore/Event.h index 4baa8066..d5e883fe 100644 --- a/Src/DasherCore/Event.h +++ b/Src/DasherCore/Event.h @@ -4,8 +4,6 @@ #include #include -#include "DasherTypes.h" - namespace Dasher { class CEditEvent; diff --git a/Src/DasherCore/FileWordGenerator.h b/Src/DasherCore/FileWordGenerator.h index b1aeee18..a65858b7 100644 --- a/Src/DasherCore/FileWordGenerator.h +++ b/Src/DasherCore/FileWordGenerator.h @@ -5,6 +5,7 @@ #include #include "WordGeneratorBase.h" +#include "AbstractXMLParser.h" namespace Dasher { diff --git a/Src/DasherCore/FrameRate.cpp b/Src/DasherCore/FrameRate.cpp index b7c1b1e9..73dc9c14 100644 --- a/Src/DasherCore/FrameRate.cpp +++ b/Src/DasherCore/FrameRate.cpp @@ -1,4 +1,7 @@ #include "FrameRate.h" +#include "DasherModel.h" +#include +#include using namespace Dasher; diff --git a/Src/DasherCore/FrameRate.h b/Src/DasherCore/FrameRate.h index 2d51fdc9..12b96dd9 100644 --- a/Src/DasherCore/FrameRate.h +++ b/Src/DasherCore/FrameRate.h @@ -9,9 +9,7 @@ #ifndef __FrameRate_h__ #define __FrameRate_h__ -#include #include "SettingsStore.h" -#include "DasherModel.h" namespace Dasher { /// \ingroup Model diff --git a/Src/DasherCore/GameModule.cpp b/Src/DasherCore/GameModule.cpp index 202b731a..3bd9a5ec 100644 --- a/Src/DasherCore/GameModule.cpp +++ b/Src/DasherCore/GameModule.cpp @@ -4,6 +4,7 @@ #include "GameStatistics.h" #include +#include using namespace Dasher; diff --git a/Src/DasherCore/GameStatistics.h b/Src/DasherCore/GameStatistics.h index 9e595e40..1818e39d 100644 --- a/Src/DasherCore/GameStatistics.h +++ b/Src/DasherCore/GameStatistics.h @@ -6,8 +6,9 @@ #include #include -#include #include +#include +#include // 1/size(v) * Sum_{i \elem v}((i-mean)^n) template diff --git a/Src/DasherCore/InputFilter.h b/Src/DasherCore/InputFilter.h index 73849533..3efb4752 100644 --- a/Src/DasherCore/InputFilter.h +++ b/Src/DasherCore/InputFilter.h @@ -6,6 +6,7 @@ #include "ModuleManager.h" #include "UserLogBase.h" #include "DasherInput.h" +#include "SettingsStore.h" namespace Dasher { class CDasherInterfaceBase; diff --git a/Src/DasherCore/LanguageModelling/CTWLanguageModel.cpp b/Src/DasherCore/LanguageModelling/CTWLanguageModel.cpp index 620e1da4..b207c429 100644 --- a/Src/DasherCore/LanguageModelling/CTWLanguageModel.cpp +++ b/Src/DasherCore/LanguageModelling/CTWLanguageModel.cpp @@ -25,9 +25,9 @@ //#include "stdafx.h" #include "CTWLanguageModel.h" #include -#include // not in use anymore? needed it for log #include #include +#include #include "HashTable.h" using namespace Dasher; diff --git a/Src/DasherCore/LanguageModelling/DictLanguageModel.cpp b/Src/DasherCore/LanguageModelling/DictLanguageModel.cpp index 1f4547b7..f5e24f37 100644 --- a/Src/DasherCore/LanguageModelling/DictLanguageModel.cpp +++ b/Src/DasherCore/LanguageModelling/DictLanguageModel.cpp @@ -10,8 +10,6 @@ #include "../Alphabet/AlphabetMap.h" #include -#include -#include #include #include using namespace Dasher; diff --git a/Src/DasherCore/LanguageModelling/DictLanguageModel.h b/Src/DasherCore/LanguageModelling/DictLanguageModel.h index 8d3cbfa4..ca7478f0 100644 --- a/Src/DasherCore/LanguageModelling/DictLanguageModel.h +++ b/Src/DasherCore/LanguageModelling/DictLanguageModel.h @@ -9,15 +9,14 @@ #ifndef __DictLanguageModel_h__ #define __DictLanguageModel_h__ -#include "../../Common/NoClones.h" #include "../../Common/Allocators/PooledAlloc.h" -#include "PPMLanguageModel.h" #include "../Alphabet/AlphInfo.h" #include "../Alphabet/AlphabetMap.h" +#include "LanguageModel.h" +#include "../SettingsStore.h" #include #include #include -#include //static char dumpTrieStr[40000]; //const int maxcont =200; diff --git a/Src/DasherCore/LanguageModelling/HashTable.h b/Src/DasherCore/LanguageModelling/HashTable.h index 87bc3c5a..ab3cf55a 100644 --- a/Src/DasherCore/LanguageModelling/HashTable.h +++ b/Src/DasherCore/LanguageModelling/HashTable.h @@ -21,11 +21,6 @@ #ifndef __Hashtable_h__ #define __Hashtable_h__ -#include "LanguageModel.h" - -using namespace Dasher; -//using namespace std; - namespace Dasher { class CHashTable { //class to store the hashtable used to find indices of nodes diff --git a/Src/DasherCore/LanguageModelling/PPMLanguageModel.cpp b/Src/DasherCore/LanguageModelling/PPMLanguageModel.cpp index 115aa2a5..798ebdcb 100644 --- a/Src/DasherCore/LanguageModelling/PPMLanguageModel.cpp +++ b/Src/DasherCore/LanguageModelling/PPMLanguageModel.cpp @@ -8,9 +8,6 @@ #include "PPMLanguageModel.h" -#include -#include -#include #include #include diff --git a/Src/DasherCore/LanguageModelling/PPMLanguageModel.h b/Src/DasherCore/LanguageModelling/PPMLanguageModel.h index 0ff35ef5..e826ec10 100644 --- a/Src/DasherCore/LanguageModelling/PPMLanguageModel.h +++ b/Src/DasherCore/LanguageModelling/PPMLanguageModel.h @@ -12,6 +12,7 @@ #include "../../Common/NoClones.h" #include "../../Common/Allocators/PooledAlloc.h" +#include "DasherTypes.h" #include "LanguageModel.h" #include "../SettingsStore.h" #include "stdlib.h" diff --git a/Src/DasherCore/LanguageModelling/PPMPYLanguageModel.cpp b/Src/DasherCore/LanguageModelling/PPMPYLanguageModel.cpp index f292c060..6cbb4964 100644 --- a/Src/DasherCore/LanguageModelling/PPMPYLanguageModel.cpp +++ b/Src/DasherCore/LanguageModelling/PPMPYLanguageModel.cpp @@ -12,9 +12,8 @@ #include "PPMPYLanguageModel.h" #include "LanguageModel.h" -#include -#include -#include +#include "PPMLanguageModel.h" +#include "DasherTypes.h" #include using namespace Dasher; diff --git a/Src/DasherCore/LanguageModelling/PPMPYLanguageModel.h b/Src/DasherCore/LanguageModelling/PPMPYLanguageModel.h index 3fa977f3..bd7e5ec7 100644 --- a/Src/DasherCore/LanguageModelling/PPMPYLanguageModel.h +++ b/Src/DasherCore/LanguageModelling/PPMPYLanguageModel.h @@ -13,12 +13,11 @@ #ifndef __PPMPYLanguageModel_h__ #define __PPMPYLanguageModel_h__ -#include "../../Common/NoClones.h" -#include "../../Common/Allocators/PooledAlloc.h" - #include "PPMLanguageModel.h" +#include "DasherTypes.h" #include +#include namespace Dasher { diff --git a/Src/DasherCore/LanguageModelling/WordLanguageModel.cpp b/Src/DasherCore/LanguageModelling/WordLanguageModel.cpp index fd6c2a1a..9e3451ee 100644 --- a/Src/DasherCore/LanguageModelling/WordLanguageModel.cpp +++ b/Src/DasherCore/LanguageModelling/WordLanguageModel.cpp @@ -15,7 +15,6 @@ #include #include #include -#include using namespace Dasher; @@ -234,10 +233,11 @@ void CWordLanguageModel::GetProbs(Context context, std::vector &pr double dP; - if(pTmpChild->count > 0) + if(pTmpChild->count > 0){ dP = dToSpend * (pTmpChild->count) / static_cast < double >(iTotal + alpha); - else - dP = 0.0; + } else { + dP = 0.0; + } dProbs[pTmpChild->sbl] += dP; } diff --git a/Src/DasherCore/LanguageModelling/WordLanguageModel.h b/Src/DasherCore/LanguageModelling/WordLanguageModel.h index 51a4b128..b7105e3c 100644 --- a/Src/DasherCore/LanguageModelling/WordLanguageModel.h +++ b/Src/DasherCore/LanguageModelling/WordLanguageModel.h @@ -9,9 +9,6 @@ #ifndef __WordLanguageModel_h__ #define __WordLanguageModel_h__ -#include - -#include "../../Common/NoClones.h" #include "../../Common/Allocators/PooledAlloc.h" #include "PPMLanguageModel.h" #include "../SettingsStore.h" @@ -21,7 +18,6 @@ #include #include #include -#include //static char dumpTrieStr[40000]; //const int maxcont =200; diff --git a/Src/DasherCore/ModuleManager.h b/Src/DasherCore/ModuleManager.h index e759a53d..d5ef0dd5 100644 --- a/Src/DasherCore/ModuleManager.h +++ b/Src/DasherCore/ModuleManager.h @@ -1,12 +1,9 @@ #pragma once -#include "DasherModule.h" - #include #include #include - namespace Dasher { class CDasherInput; class CInputFilter; diff --git a/Src/DasherCore/OneButtonFilter.cpp b/Src/DasherCore/OneButtonFilter.cpp index 5e79e96d..291c8d4c 100644 --- a/Src/DasherCore/OneButtonFilter.cpp +++ b/Src/DasherCore/OneButtonFilter.cpp @@ -2,6 +2,7 @@ #include "OneButtonFilter.h" #include +#include #include "DasherScreen.h" #include "DasherModel.h" diff --git a/Src/DasherCore/OneDimensionalFilter.cpp b/Src/DasherCore/OneDimensionalFilter.cpp index 0d7414d4..ea12737d 100644 --- a/Src/DasherCore/OneDimensionalFilter.cpp +++ b/Src/DasherCore/OneDimensionalFilter.cpp @@ -1,5 +1,7 @@ #include "OneDimensionalFilter.h" #include "CircleStartHandler.h" +#include +#include using namespace Dasher; diff --git a/Src/DasherCore/RoutingAlphMgr.cpp b/Src/DasherCore/RoutingAlphMgr.cpp index 5be0c845..d67bf030 100644 --- a/Src/DasherCore/RoutingAlphMgr.cpp +++ b/Src/DasherCore/RoutingAlphMgr.cpp @@ -11,6 +11,7 @@ #include #include "DasherInterfaceBase.h" +#include "LanguageModelling/RoutingPPMLanguageModel.h" using namespace Dasher; diff --git a/Src/DasherCore/RoutingAlphMgr.h b/Src/DasherCore/RoutingAlphMgr.h index 338f7872..0331e5c5 100644 --- a/Src/DasherCore/RoutingAlphMgr.h +++ b/Src/DasherCore/RoutingAlphMgr.h @@ -10,7 +10,6 @@ #define __RoutingAlphMgr_h__ #include "AlphabetManager.h" -#include "LanguageModelling/RoutingPPMLanguageModel.h" namespace Dasher { diff --git a/Src/DasherCore/ScreenGameModule.cpp b/Src/DasherCore/ScreenGameModule.cpp index 67d74782..6fd48564 100644 --- a/Src/DasherCore/ScreenGameModule.cpp +++ b/Src/DasherCore/ScreenGameModule.cpp @@ -2,6 +2,7 @@ // Dasher #include "ScreenGameModule.h" +#include using namespace Dasher; diff --git a/Src/DasherCore/SettingsStore.cpp b/Src/DasherCore/SettingsStore.cpp index 88d6812c..61fc1436 100644 --- a/Src/DasherCore/SettingsStore.cpp +++ b/Src/DasherCore/SettingsStore.cpp @@ -9,7 +9,6 @@ #include "SettingsStore.h" #include -#include #include using namespace Dasher; diff --git a/Src/DasherCore/SmoothingFilter.cpp b/Src/DasherCore/SmoothingFilter.cpp index eafb73db..a6161590 100644 --- a/Src/DasherCore/SmoothingFilter.cpp +++ b/Src/DasherCore/SmoothingFilter.cpp @@ -1,6 +1,6 @@ #include "SmoothingFilter.h" - -#include +#include +#include Dasher::CSmoothingFilter::CSmoothingFilter(CSettingsStore* pSettingsStore, CDasherInterfaceBase* pInterface, CFrameRate* pFramerate, const char *szName) : CPressFilter(pSettingsStore, pInterface, pFramerate, szName) { diff --git a/Src/DasherCore/StylusFilter.cpp b/Src/DasherCore/StylusFilter.cpp index 8323e5e1..026ed8f5 100644 --- a/Src/DasherCore/StylusFilter.cpp +++ b/Src/DasherCore/StylusFilter.cpp @@ -1,6 +1,5 @@ #include "StylusFilter.h" #include "DasherInterfaceBase.h" -#include "ClickFilter.h" using namespace Dasher; diff --git a/Src/DasherCore/Trainer.cpp b/Src/DasherCore/Trainer.cpp index f3e370d4..00e8ad18 100644 --- a/Src/DasherCore/Trainer.cpp +++ b/Src/DasherCore/Trainer.cpp @@ -5,6 +5,7 @@ #include #include +#include using namespace Dasher; diff --git a/Src/DasherCore/Trainer.h b/Src/DasherCore/Trainer.h index 4e2094d8..06c09303 100644 --- a/Src/DasherCore/Trainer.h +++ b/Src/DasherCore/Trainer.h @@ -1,9 +1,10 @@ #ifndef __trainer_h__ #define __trainer_h__ -#include "LanguageModelling/PPMPYLanguageModel.h" #include "Alphabet/AlphInfo.h" #include "AbstractXMLParser.h" +#include "AlphabetMap.h" +#include "LanguageModel.h" namespace Dasher { class CTrainer : public AbstractParser { diff --git a/Src/DasherCore/TwoButtonDynamicFilter.cpp b/Src/DasherCore/TwoButtonDynamicFilter.cpp index fdb98aa2..50629da6 100644 --- a/Src/DasherCore/TwoButtonDynamicFilter.cpp +++ b/Src/DasherCore/TwoButtonDynamicFilter.cpp @@ -21,6 +21,7 @@ #include "TwoButtonDynamicFilter.h" #include +#include #include "DasherInterfaceBase.h" diff --git a/Src/DasherCore/TwoPushDynamicFilter.cpp b/Src/DasherCore/TwoPushDynamicFilter.cpp index 14f0e46c..46878504 100644 --- a/Src/DasherCore/TwoPushDynamicFilter.cpp +++ b/Src/DasherCore/TwoPushDynamicFilter.cpp @@ -21,6 +21,7 @@ #include "TwoPushDynamicFilter.h" #include +#include #include "DasherInterfaceBase.h" diff --git a/Src/DasherCore/UserLog.cpp b/Src/DasherCore/UserLog.cpp index 510a3e7d..c864e366 100644 --- a/Src/DasherCore/UserLog.cpp +++ b/Src/DasherCore/UserLog.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include "FileLogger.h" #include "FileUtils.h" diff --git a/Src/DasherCore/UserLog.h b/Src/DasherCore/UserLog.h index a09a15c5..873a4c84 100644 --- a/Src/DasherCore/UserLog.h +++ b/Src/DasherCore/UserLog.h @@ -34,7 +34,6 @@ #include "UserLogTrial.h" #include "UserLogParam.h" #include "UserLogBase.h" -#include "Event.h" #include "XMLUtil.h" #include "SettingsStore.h" diff --git a/Src/DasherCore/UserLogBase.h b/Src/DasherCore/UserLogBase.h index efccdfd8..e1eae1cf 100644 --- a/Src/DasherCore/UserLogBase.h +++ b/Src/DasherCore/UserLogBase.h @@ -4,7 +4,6 @@ #include "DasherTypes.h" #include "UserLogTrial.h" // Don't want to include this, but needed for event type enum #include "Event.h" -#include "SettingsStore.h" #include #include diff --git a/Src/DasherCore/UserLogParam.cpp b/Src/DasherCore/UserLogParam.cpp index a41ee8dd..d87eeba7 100644 --- a/Src/DasherCore/UserLogParam.cpp +++ b/Src/DasherCore/UserLogParam.cpp @@ -1,7 +1,5 @@ #include "UserLogParam.h" - - // Needed so we can sort() vectors of parameters bool CUserLogParam::ComparePtr(CUserLogParam* pA, CUserLogParam* pB) { diff --git a/Src/DasherCore/WordGeneratorBase.cpp b/Src/DasherCore/WordGeneratorBase.cpp index 6a934282..d3b65bc8 100644 --- a/Src/DasherCore/WordGeneratorBase.cpp +++ b/Src/DasherCore/WordGeneratorBase.cpp @@ -1,4 +1,5 @@ #include "WordGeneratorBase.h" +#include using namespace Dasher; diff --git a/Src/DasherCore/WordGeneratorBase.h b/Src/DasherCore/WordGeneratorBase.h index 31d013fe..6161be8f 100644 --- a/Src/DasherCore/WordGeneratorBase.h +++ b/Src/DasherCore/WordGeneratorBase.h @@ -2,9 +2,8 @@ #define __WordGeneratorBase_h__ #include -#include #include "Alphabet/AlphabetMap.h" -#include "Alphabet/AlphIO.h" +#include "AlphInfo.h" namespace Dasher { /**