aboutsummaryrefslogtreecommitdiff
path: root/dw/textblock_linebreaking.cc
diff options
context:
space:
mode:
authorsgeerken <devnull@localhost>2012-09-05 21:17:29 +0200
committersgeerken <devnull@localhost>2012-09-05 21:17:29 +0200
commitad24e923d3ebc769789f05349a3034be9a551bee (patch)
treeb5cd4eb4cf80718acfd5a00cded7a5772545f95f /dw/textblock_linebreaking.cc
parent97c5cff6bcc41c2ac1239ba25c9f7ab34e16e6ba (diff)
Too tight lines are now *exclusively* the worst case.
Diffstat (limited to 'dw/textblock_linebreaking.cc')
-rw-r--r--dw/textblock_linebreaking.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/dw/textblock_linebreaking.cc b/dw/textblock_linebreaking.cc
index 80e41945..dd415769 100644
--- a/dw/textblock_linebreaking.cc
+++ b/dw/textblock_linebreaking.cc
@@ -23,7 +23,7 @@ int Textblock::BadnessAndPenalty::badnessValue (int infLevel)
return infLevel == INF_VALUE ? badness : 0;
case TOO_TIGHT:
- return infLevel == INF_INFINITE ? 1 : 0;
+ return infLevel == INF_TOO_TIGHT ? 1 : 0;
}
// compiler happiness
@@ -35,10 +35,10 @@ int Textblock::BadnessAndPenalty::penaltyValue (int infLevel)
{
switch (penaltyState) {
case FORCE_BREAK:
- return infLevel == INF_INFINITE ? -1 : 0;
+ return infLevel == INF_PENALTIES ? -1 : 0;
case PROHIBIT_BREAK:
- return infLevel == INF_INFINITE ? 1 : 0;
+ return infLevel == INF_PENALTIES ? 1 : 0;
case PENALTY_VALUE:
return infLevel == INF_VALUE ? penalty : 0;