summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2023-04-01 13:02:50 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2023-04-01 13:02:50 -0700
commit15f75aa8e6578cd2a27cadfc11e31b58e2fc6683 (patch)
treece954f375246067725a5594dc41693f5be76d892
parent11fa7c2d7c5c668ea921f1dbc6b70e97e3535afe (diff)
Remove unused function findIndex
Found by cppcheck Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--fonttosfnt.h1
-rw-r--r--struct.c15
2 files changed, 0 insertions, 16 deletions
diff --git a/fonttosfnt.h b/fonttosfnt.h
index 63852c5..5a9decc 100644
--- a/fonttosfnt.h
+++ b/fonttosfnt.h
@@ -165,7 +165,6 @@ BitmapPtr makeBitmap(StrikePtr, int,
IndexSubTablePtr makeIndexSubTables(StrikePtr, CmapPtr);
int fontIndex(FontPtr, int);
CmapPtr makeCmap(FontPtr);
-int findIndex(CmapPtr, int);
int findCode(CmapPtr, int);
BitmapPtr strikeBitmapIndex(StrikePtr, CmapPtr, int);
int strikeMaxWidth(StrikePtr);
diff --git a/struct.c b/struct.c
index 2463180..f86feb3 100644
--- a/struct.c
+++ b/struct.c
@@ -390,21 +390,6 @@ makeCmap(FontPtr font)
}
int
-findIndex(CmapPtr cmap_head, int code)
-{
- CmapPtr cmap;
- cmap = cmap_head;
- while(cmap) {
- if(cmap->endCode > code)
- return -1;
- if(cmap->startCode <= code)
- return cmap->index + code - cmap->startCode;
- cmap = cmap->next;
- }
- return -1;
-}
-
-int
findCode(CmapPtr cmap_head, int index)
{
if(index < 0 || index > cmap_head->maxindex)