fix R5 build as suggested by Stefano (please check :))
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18820 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -413,7 +413,11 @@ BTranslationUtils::GetStyledText(BPositionIO *fromStream, BTextView *intoView,
|
|||||||
if (runArray) {
|
if (runArray) {
|
||||||
intoView->Insert(intoView->TextLength(), text,
|
intoView->Insert(intoView->TextLength(), text,
|
||||||
textHeader.header.data_size, runArray);
|
textHeader.header.data_size, runArray);
|
||||||
|
#ifdef HAIKU_TARGET_PLATFORM_HAIKU
|
||||||
BTextView::FreeRunArray(runArray);
|
BTextView::FreeRunArray(runArray);
|
||||||
|
#else
|
||||||
|
free(runArray);
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
// run array seems to be garbled; the text alone must be enough
|
// run array seems to be garbled; the text alone must be enough
|
||||||
intoView->Insert(intoView->TextLength(), text,
|
intoView->Insert(intoView->TextLength(), text,
|
||||||
@@ -473,7 +477,11 @@ BTranslationUtils::PutStyledText(BTextView *fromView, BPositionIO *intoStream,
|
|||||||
void *pflatRunArray =
|
void *pflatRunArray =
|
||||||
BTextView::FlattenRunArray(runArray, &flatRunArrayLength);
|
BTextView::FlattenRunArray(runArray, &flatRunArrayLength);
|
||||||
if (pflatRunArray == NULL) {
|
if (pflatRunArray == NULL) {
|
||||||
|
#ifdef HAIKU_TARGET_PLATFORM_HAIKU
|
||||||
BTextView::FreeRunArray(runArray);
|
BTextView::FreeRunArray(runArray);
|
||||||
|
#else
|
||||||
|
free(runArray);
|
||||||
|
#endif
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -564,7 +572,11 @@ BTranslationUtils::PutStyledText(BTextView *fromView, BPositionIO *intoStream,
|
|||||||
}
|
}
|
||||||
|
|
||||||
free(pflatRunArray);
|
free(pflatRunArray);
|
||||||
|
#ifdef HAIKU_TARGET_PLATFORM_HAIKU
|
||||||
BTextView::FreeRunArray(runArray);
|
BTextView::FreeRunArray(runArray);
|
||||||
|
#else
|
||||||
|
free(runArray);
|
||||||
|
#endif
|
||||||
|
|
||||||
return ok ? B_OK : B_ERROR;
|
return ok ? B_OK : B_ERROR;
|
||||||
}
|
}
|
||||||
@@ -667,7 +679,11 @@ BTranslationUtils::WriteStyledEditFile(BTextView* view, BFile* file)
|
|||||||
}
|
}
|
||||||
|
|
||||||
free(flattenedRunArray);
|
free(flattenedRunArray);
|
||||||
|
#ifdef HAIKU_TARGET_PLATFORM_HAIKU
|
||||||
BTextView::FreeRunArray(runArray);
|
BTextView::FreeRunArray(runArray);
|
||||||
|
#else
|
||||||
|
free(runArray);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
|
|||||||
Reference in New Issue
Block a user