diff options
author | hieuhoang1972 <hieuhoang1972@1f5c12ca-751b-0410-a591-d2e778427230> | 2007-07-10 17:18:09 +0400 |
---|---|---|
committer | hieuhoang1972 <hieuhoang1972@1f5c12ca-751b-0410-a591-d2e778427230> | 2007-07-10 17:18:09 +0400 |
commit | dab6d309ec5b0f609342d45cf6b1016cc3223fb4 (patch) | |
tree | 691226f1ca1f30b0a0e625d95824ca79ab044edb /moses | |
parent | 1147f71e4869468f582eed32264348889967e76d (diff) |
UINT32 for windows comp
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@1424 1f5c12ca-751b-0410-a591-d2e778427230
Diffstat (limited to 'moses')
-rw-r--r-- | moses/src/PrefixTreeMap.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/moses/src/PrefixTreeMap.cpp b/moses/src/PrefixTreeMap.cpp index 9b8b05c4a..412651b17 100644 --- a/moses/src/PrefixTreeMap.cpp +++ b/moses/src/PrefixTreeMap.cpp @@ -1,16 +1,17 @@ #include "PrefixTreeMap.h" +#include "TypeDef.h" void GenericCandidate::readBin(FILE* f){ m_PhraseList.clear(); m_ScoreList.clear(); - uint32_t num_phrases; // on older compilers, <stdint.h> may need to be included + UINT32 num_phrases; // on older compilers, <stdint.h> may need to be included fRead(f, num_phrases); for(unsigned int i = 0; i < num_phrases; ++i){ IPhrase phrase; fReadVector(f, phrase); m_PhraseList.push_back(phrase); }; - uint32_t num_scores; + UINT32 num_scores; fRead(f, num_scores); for(unsigned int j = 0; j < num_scores; ++j){ std::vector<float> score; @@ -21,11 +22,11 @@ void GenericCandidate::readBin(FILE* f){ void GenericCandidate::writeBin(FILE* f) const { // cast is necessary to ensure compatibility between 32- and 64-bit platforms - fWrite(f, static_cast<uint32_t>(m_PhraseList.size())); + fWrite(f, static_cast<UINT32>(m_PhraseList.size())); for(size_t i = 0; i < m_PhraseList.size(); ++i){ fWriteVector(f, m_PhraseList[i]); } - fWrite(f, static_cast<uint32_t>(m_ScoreList.size())); + fWrite(f, static_cast<UINT32>(m_ScoreList.size())); for(size_t j = 0; j < m_ScoreList.size(); ++j){ fWriteVector(f, m_ScoreList[j]); } @@ -33,7 +34,7 @@ void GenericCandidate::writeBin(FILE* f) const { void Candidates::writeBin(FILE* f) const { - uint32_t s = this->size(); + UINT32 s = this->size(); fWrite(f,s); for(size_t i = 0; i < s; ++i) { MyBase::operator[](i).writeBin(f); @@ -41,7 +42,7 @@ void Candidates::writeBin(FILE* f) const { } void Candidates::readBin(FILE* f) { - uint32_t s; + UINT32 s; fRead(f,s); this->resize(s); for(size_t i = 0; i<s; ++i) { |