Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(930)

Unified Diff: lily/note-head.cc

Issue 367870043: Issue 5428: Avoid type-conversion warnings related to font glyph index (Closed)
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lily/include/font-metric.hh ('k') | lily/open-type-font.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lily/note-head.cc
diff --git a/lily/note-head.cc b/lily/note-head.cc
index 73a2255d9040a91199e994cf05c2fe0e6f9a74b5..386436852c6688239ebf3391730a10cec2c47bf6 100644
--- a/lily/note-head.cc
+++ b/lily/note-head.cc
@@ -166,8 +166,8 @@ Note_head::get_stem_attachment (Font_metric *fm, const string &key)
{
Offset att;
- int k = fm->name_to_index (key);
- if (k >= 0)
+ size_t k = fm->name_to_index (key);
+ if (k != GLYPH_INDEX_INVALID)
{
Box b = fm->get_indexed_char_dimensions (k);
Offset wxwy = fm->attachment_point (key);
« no previous file with comments | « lily/include/font-metric.hh ('k') | lily/open-type-font.cc » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b