Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17538 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -98,10 +98,10 @@ _BWidthBuffer_::StringWidth(const char *inText, int32 fromOffset, int32 length,
|
|||||||
float stringWidth = 0;
|
float stringWidth = 0;
|
||||||
if (length > 0) {
|
if (length > 0) {
|
||||||
for (int32 charLen = 0, currentOffset = fromOffset;
|
for (int32 charLen = 0, currentOffset = fromOffset;
|
||||||
currentOffset < fromOffset + length;
|
currentOffset < fromOffset + length;
|
||||||
currentOffset += charLen) {
|
currentOffset += charLen) {
|
||||||
|
|
||||||
charLen = UTF8NextCharLen(inText + currentOffset);
|
charLen = UTF8NextCharLen(inText + currentOffset);
|
||||||
|
|
||||||
// End of string, bail out
|
// End of string, bail out
|
||||||
if (charLen == 0)
|
if (charLen == 0)
|
||||||
break;
|
break;
|
||||||
@@ -172,11 +172,12 @@ _BWidthBuffer_::FindTable(const BFont *inStyle, int32 *outIndex)
|
|||||||
for (int32 i = 0; i < fItemCount; i++) {
|
for (int32 i = 0; i < fItemCount; i++) {
|
||||||
|
|
||||||
#if USE_DANO_WIDTHBUFFER
|
#if USE_DANO_WIDTHBUFFER
|
||||||
if (*inStyle == fBuffer[i].font) {
|
if (*inStyle == fBuffer[i].font)
|
||||||
#else
|
#else
|
||||||
if (fontSize == fBuffer[i].fontSize
|
if (fontSize == fBuffer[i].fontSize
|
||||||
&& fontCode == fBuffer[i].fontCode) {
|
&& fontCode == fBuffer[i].fontCode)
|
||||||
#endif
|
#endif
|
||||||
|
{
|
||||||
tableIndex = i;
|
tableIndex = i;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user