Added consts to the OpenType implementations.
This commit is contained in:
parent
d979f7a93e
commit
1733c28b52
|
@ -20,7 +20,7 @@ void uiFreeOpenTypeFeatures(uiOpenTypeFeatures *otf)
|
|||
uiFree(otf);
|
||||
}
|
||||
|
||||
uiOpenTypeFeatures *uiOpenTypeFeaturesClone(uiOpenTypeFeatures *otf)
|
||||
uiOpenTypeFeatures *uiOpenTypeFeaturesClone(const uiOpenTypeFeatures *otf)
|
||||
{
|
||||
uiOpenTypeFeatures *out;
|
||||
|
||||
|
@ -82,7 +82,7 @@ void uiOpenTypeFeaturesForEach(uiOpenTypeFeatures *otf, uiOpenTypeFeaturesForEac
|
|||
}];
|
||||
}
|
||||
|
||||
int uiOpenTypeFeaturesEqual(uiOpenTypeFeatures *a, uiOpenTypeFeatures *b)
|
||||
int uiOpenTypeFeaturesEqual(const uiOpenTypeFeatures *a, const uiOpenTypeFeatures *b)
|
||||
{
|
||||
return [a->tags isEqualToDictionary:b->tags];
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ static void cloneTags(gpointer key, gpointer value, gpointer data)
|
|||
g_hash_table_replace((GHashTable *) data, key, value);
|
||||
}
|
||||
|
||||
uiOpenTypeFeatures *uiOpenTypeFeaturesClone(uiOpenTypeFeatures *otf)
|
||||
uiOpenTypeFeatures *uiOpenTypeFeaturesClone(const uiOpenTypeFeatures *otf)
|
||||
{
|
||||
uiOpenTypeFeatures *out;
|
||||
|
||||
|
@ -119,10 +119,11 @@ static GList *copySortedKeys(GHashTable *tags)
|
|||
copy = g_list_copy(k);
|
||||
copy = g_list_sort(copy, tagcmp);
|
||||
// TODO do we free k? the docs contradict themselves
|
||||
// TODO I already forgot, does g_list_sort() copy, or just change the head?
|
||||
return copy;
|
||||
}
|
||||
|
||||
int uiOpenTypeFeaturesEqual(uiOpenTypeFeatures *a, uiOpenTypeFeatures *b)
|
||||
int uiOpenTypeFeaturesEqual(const uiOpenTypeFeatures *a, const uiOpenTypeFeatures *b)
|
||||
{
|
||||
GList *ak, *bk;
|
||||
GList *ai, *bi;
|
||||
|
|
|
@ -22,7 +22,7 @@ void uiFreeOpenTypeFeatures(uiOpenTypeFeatures *otf)
|
|||
uiFree(otf);
|
||||
}
|
||||
|
||||
uiOpenTypeFeatures *uiOpenTypeFeaturesClone(uiOpenTypeFeatures *otf)
|
||||
uiOpenTypeFeatures *uiOpenTypeFeaturesClone(const uiOpenTypeFeatures *otf)
|
||||
{
|
||||
uiOpenTypeFeatures *out;
|
||||
|
||||
|
@ -75,7 +75,7 @@ void uiOpenTypeFeaturesForEach(uiOpenTypeFeatures *otf, uiOpenTypeFeaturesForEac
|
|||
}
|
||||
}
|
||||
|
||||
int uiOpenTypeFeaturesEqual(uiOpenTypeFeatures *a, uiOpenTypeFeatures *b)
|
||||
int uiOpenTypeFeaturesEqual(const uiOpenTypeFeatures *a, const uiOpenTypeFeatures *b)
|
||||
{
|
||||
// TODO make sure this is correct
|
||||
return *(a->tags) == *(b->tags);
|
||||
|
|
Loading…
Reference in New Issue