Skip to content
This repository was archived by the owner on Apr 29, 2021. It is now read-only.

Commit a8d6bc4

Browse files
author
Yuncong Zhang
committed
Make some small fixes.
1 parent 3a6cd1a commit a8d6bc4

File tree

2 files changed

+1
-18
lines changed

2 files changed

+1
-18
lines changed

Runtime/ui/txt/linebreaker.cs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,6 @@ class TabStops {
1515

1616
const int kTabSpaceCount = 4;
1717

18-
List<int> _stops = new List<int>();
19-
20-
public void set(List<int> stops, int tabWidth) {
21-
this._stops.Clear();
22-
if (stops != null) {
23-
this._stops.AddRange(stops);
24-
}
25-
26-
this._tabWidth = tabWidth;
27-
}
28-
2918
public void setFont(Font font, int size) {
3019
if (this._font != font || this._fontSize != size) {
3120
this._tabWidth = int.MaxValue;
@@ -42,12 +31,6 @@ public void setFont(Font font, int size) {
4231
}
4332

4433
public float nextTab(float widthSoFar) {
45-
for (int i = 0; i < this._stops.Count; i++) {
46-
if (this._stops[i] > widthSoFar) {
47-
return this._stops[i];
48-
}
49-
}
50-
5134
if (this._tabWidth == int.MaxValue) {
5235
if (this._fontSize > 0) {
5336
this._tabWidth = this._spaceAdvance * kTabSpaceCount;

Runtime/ui/txt/wordbreaker.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
namespace Unity.UIWidgets.ui {
3-
class WordBreaker {
3+
struct WordBreaker {
44
public const uint U16_SURROGATE_OFFSET = ((0xd800 << 10) + 0xdc00 - 0x10000);
55
TextBuff _text;
66
int _current;

0 commit comments

Comments
 (0)