mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-28 00:59:16 +01:00
[raster] Remove unused hb_svg_str_t helpers
This commit is contained in:
1 parent
588faa2da2
commit
f52b058db2
1 file changed
-16
@@ -56,12 +56,6 @@ struct hb_svg_str_t
|
||||
return len >= plen && memcmp (data, prefix, plen) == 0;
|
||||
}
|
||||
|
||||
bool eq_cstr (const char *s) const
|
||||
{
|
||||
unsigned slen = (unsigned) strlen (s);
|
||||
return len == slen && memcmp (data, s, len) == 0;
|
||||
}
|
||||
|
||||
float to_float () const
|
||||
{
|
||||
if (!data || !len) return 0.f;
|
||||
@@ -73,16 +67,6 @@ struct hb_svg_str_t
|
||||
return isfinite (v) ? v : 0.f;
|
||||
}
|
||||
|
||||
int to_int () const
|
||||
{
|
||||
if (!data || !len) return 0;
|
||||
char buf[32];
|
||||
unsigned n = hb_min (len, (unsigned) sizeof (buf) - 1);
|
||||
memcpy (buf, data, n);
|
||||
buf[n] = '\0';
|
||||
return atoi (buf);
|
||||
}
|
||||
|
||||
hb_svg_str_t trim_left () const
|
||||
{
|
||||
const char *p = data;
|
||||
|
||||
Reference in new issue
Block a user