MessageFormat: Use off_t argument instead of int32
Which doubles the maximum width fixing #11809. I wanted to convert this to a variadic functionbut that would require updating all of the instance that use MessageFormat or a clever hack to get around the ambiguity of an off_t argument and an int argument count with 0 arguments. Either way seemed out of the scope of fixing this bug. Fixes #11809 Another Beta1 bug down!
This commit is contained in:
@@ -1,6 +1,10 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2014, Haiku, Inc.
|
* Copyright 2014-2015 Haiku, Inc. All rights reserved.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
|
*
|
||||||
|
* Authors:
|
||||||
|
* Adrien Destugues, [email protected]
|
||||||
|
* John Scipione, [email protected]
|
||||||
*/
|
*/
|
||||||
#ifndef _B_MESSAGE_FORMAT_H_
|
#ifndef _B_MESSAGE_FORMAT_H_
|
||||||
#define _B_MESSAGE_FORMAT_H_
|
#define _B_MESSAGE_FORMAT_H_
|
||||||
@@ -24,7 +28,7 @@ public:
|
|||||||
|
|
||||||
status_t InitCheck();
|
status_t InitCheck();
|
||||||
|
|
||||||
status_t Format(BString& buffer, const int32 arg) const;
|
status_t Format(BString& buffer, const off_t arg) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
status_t _Initialize(const icu::UnicodeString&);
|
status_t _Initialize(const icu::UnicodeString&);
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2014, Haiku, Inc.
|
* Copyright 2014-2015 Haiku, Inc. All rights reserved.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
|
*
|
||||||
|
* Authors:
|
||||||
|
* Adrien Destugues, [email protected]
|
||||||
|
* John Scipione, [email protected]
|
||||||
*/
|
*/
|
||||||
#include <MessageFormat.h>
|
#include <MessageFormat.h>
|
||||||
|
|
||||||
@@ -41,7 +45,7 @@ BMessageFormat::InitCheck()
|
|||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
BMessageFormat::Format(BString& output, const int32 arg) const
|
BMessageFormat::Format(BString& output, const off_t arg) const
|
||||||
{
|
{
|
||||||
if (fInitStatus != B_OK)
|
if (fInitStatus != B_OK)
|
||||||
return fInitStatus;
|
return fInitStatus;
|
||||||
@@ -50,7 +54,7 @@ BMessageFormat::Format(BString& output, const int32 arg) const
|
|||||||
UErrorCode error = U_ZERO_ERROR;
|
UErrorCode error = U_ZERO_ERROR;
|
||||||
|
|
||||||
Formattable arguments[] = {
|
Formattable arguments[] = {
|
||||||
(int32_t)arg
|
(off_t)arg
|
||||||
};
|
};
|
||||||
|
|
||||||
FieldPosition pos;
|
FieldPosition pos;
|
||||||
|
|||||||
Reference in New Issue
Block a user