ICU-8105 some compilation bug fixes

X-SVN-Rev: 29255
This commit is contained in:
Markus Scherer 2010-12-31 23:56:06 +00:00
parent 951e2b9f40
commit f772c48a2c
5 changed files with 25 additions and 5 deletions

View File

@ -4,13 +4,15 @@
*
* file name: propname_data.h
*
* machine-generated on: 2010-12-30
* machine-generated on: 2010-12-31
*/
#ifndef INCLUDED_FROM_PROPNAME_CPP
# error This file must be #included from propname.cpp only.
#endif
U_NAMESPACE_BEGIN
const int32_t PropNameData::indexes[8]={0x20,0xf94,0x3789,0x6789,0x6789,0x6789,0x2f,0};
const int32_t PropNameData::valueMaps[989]={
@ -1238,3 +1240,5 @@ const char PropNameData::nameGroups[12288]={
2,'Z',0,'S','e','p','a','r','a','t','o','r',0,2,'s','c','x',0,'S','c','r','i','p','t','_','E','x','t','e','n','s','i',
'o','n','s',0
};
U_NAMESPACE_END

View File

@ -573,7 +573,7 @@ ByteTrieBuilder::BTLinearMatchNode::write(DictTrieBuilder &builder) {
ByteTrieBuilder &b=(ByteTrieBuilder &)builder;
next->write(builder);
b.write(s, length);
offset=b.write(ByteTrie::kMinLinearMatch+length-1);
offset=b.write(minLinearMatch()+length-1);
}
void
@ -638,7 +638,7 @@ ByteTrieBuilder::BTBranchHeadNode::write(DictTrieBuilder &builder) {
ByteTrieBuilder &b=(ByteTrieBuilder &)builder;
next->write(builder);
offset=b.write((length-1));
if(length>ByteTrie::kMinLinearMatch) {
if(length>minLinearMatch()) {
offset=b.write(0);
}
}

View File

@ -19,6 +19,7 @@
#include "unicode/utypes.h"
#include "unicode/stringpiece.h"
#include "bytetrie.h"
#include "charstr.h"
#include "dicttriebuilder.h"
@ -59,6 +60,13 @@ private:
int32_t writeDelta(int32_t i);
// Compacting builder.
// Indirect "friend" access.
// Nested classes cannot be friends of ByteTrie unless the whole header is included,
// at least with AIX xlC_r,
// so this Builder class, which is a friend, provides the necessary value.
static int32_t minLinearMatch() { return ByteTrie::kMinLinearMatch; }
class BTFinalValueNode : public FinalValueNode {
public:
BTFinalValueNode(int32_t v) : FinalValueNode(v) {}

View File

@ -511,7 +511,7 @@ UCharTrieBuilder::UCTLinearMatchNode::write(DictTrieBuilder &builder) {
UCharTrieBuilder &b=(UCharTrieBuilder &)builder;
next->write(builder);
b.write(s, length);
offset=b.writeValueAndType(hasValue, value, UCharTrie::kMinLinearMatch+length-1);
offset=b.writeValueAndType(hasValue, value, minLinearMatch()+length-1);
}
void
@ -575,7 +575,7 @@ void
UCharTrieBuilder::UCTBranchHeadNode::write(DictTrieBuilder &builder) {
UCharTrieBuilder &b=(UCharTrieBuilder &)builder;
next->write(builder);
if(length<=UCharTrie::kMinLinearMatch) {
if(length<=minLinearMatch()) {
offset=b.writeValueAndType(hasValue, value, length-1);
} else {
b.write(length-1);

View File

@ -20,6 +20,7 @@
#include "unicode/utypes.h"
#include "unicode/unistr.h"
#include "dicttriebuilder.h"
#include "uchartrie.h"
U_NAMESPACE_BEGIN
@ -59,6 +60,13 @@ private:
int32_t writeDelta(int32_t i);
// Compacting builder.
// Indirect "friend" access.
// Nested classes cannot be friends of UCharTrie unless the whole header is included,
// at least with AIX xlC_r,
// so this Builder class, which is a friend, provides the necessary value.
static int32_t minLinearMatch() { return UCharTrie::kMinLinearMatch; }
class UCTFinalValueNode : public FinalValueNode {
public:
UCTFinalValueNode(int32_t v) : FinalValueNode(v) {}