Improved performance (I suppose).
This commit is contained in:
parent
7d768c9e06
commit
d45f5ab8c8
1 changed files with 5 additions and 1 deletions
|
@ -68,12 +68,16 @@ public class DuffData {
|
|||
you call setData or manipulate the public fields. */
|
||||
public DuffData() { }
|
||||
|
||||
/** here for efficiency */
|
||||
private static char[] chars = new char[1];
|
||||
|
||||
/** Changes the text and font this DuffData represents.
|
||||
* @param c a character of TibetanMachineWeb or TibetanMachine text
|
||||
* @param i a TibetanMachineWeb or TibetanMachine font number
|
||||
*/
|
||||
public void setData(char c, int i) {
|
||||
text = new String(new char[] { c });
|
||||
chars[0] = c;
|
||||
text = new String(chars);
|
||||
font = i;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue