diff options
author | Raph Levien <raph@google.com> | 2015-04-15 15:22:42 -0700 |
---|---|---|
committer | Raph Levien <raph@google.com> | 2015-04-15 19:12:48 -0700 |
commit | bb86b433f97a301c11800806b1ce5331fa227d4a (patch) | |
tree | d1b23f00979bde438a597fb875afd74fa6f8f847 /include | |
parent | dc7bc6e39e1ef6b713b927baf24db8b4f02f1a3f (diff) | |
download | android_frameworks_minikin-bb86b433f97a301c11800806b1ce5331fa227d4a.tar.gz android_frameworks_minikin-bb86b433f97a301c11800806b1ce5331fa227d4a.tar.bz2 android_frameworks_minikin-bb86b433f97a301c11800806b1ce5331fa227d4a.zip |
Rename "margins" to "indents"
The name "margin" conflicts with another meaning, so we're making the
name in the public api "idents" and the code consistent in naming.
Change-Id: I9170116b4d972e4b25f0f319e78376310288eb41
Diffstat (limited to 'include')
-rw-r--r-- | include/minikin/LineBreaker.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/include/minikin/LineBreaker.h b/include/minikin/LineBreaker.h index eb501e7..ebe5dc4 100644 --- a/include/minikin/LineBreaker.h +++ b/include/minikin/LineBreaker.h @@ -44,20 +44,20 @@ class LineWidths { mFirstWidthLineCount = firstWidthLineCount; mRestWidth = restWidth; } - void setMargins(const std::vector<float>& margins) { - mMargins = margins; + void setIndents(const std::vector<float>& indents) { + mIndents = indents; } bool isConstant() const { // technically mFirstWidthLineCount == 0 would count too, but doesn't actually happen - return mRestWidth == mFirstWidth && mMargins.empty(); + return mRestWidth == mFirstWidth && mIndents.empty(); } float getLineWidth(int line) const { float width = (line < mFirstWidthLineCount) ? mFirstWidth : mRestWidth; - if (!mMargins.empty()) { - if ((size_t)line < mMargins.size()) { - width -= mMargins[line]; + if (!mIndents.empty()) { + if ((size_t)line < mIndents.size()) { + width -= mIndents[line]; } else { - width -= mMargins.back(); + width -= mIndents.back(); } } return width; @@ -66,7 +66,7 @@ class LineWidths { float mFirstWidth; int mFirstWidthLineCount; float mRestWidth; - std::vector<float> mMargins; + std::vector<float> mIndents; }; class TabStops { @@ -132,7 +132,7 @@ class LineBreaker { void setLineWidths(float firstWidth, int firstWidthLineCount, float restWidth); - void setMargins(const std::vector<float>& margins); + void setIndents(const std::vector<float>& indents); void setTabStops(const int* stops, size_t nStops, int tabWidth) { mTabStops.set(stops, nStops, tabWidth); |