diff options
author | dfilimon <dfilimon@google.com> | 2011-09-15 19:22:43 +0000 |
---|---|---|
committer | dfilimon <dfilimon@google.com> | 2011-09-15 19:22:43 +0000 |
commit | ed970d282fdc9b3e2582c10babfd6d9caa5d7984 (patch) | |
tree | bb3b36bb446ed414497f072347bd008745bb9b60 /cpp/src/sfntly | |
parent | 39455fac3d7a2e7a3ea8fc624f10ec8521ce892e (diff) | |
download | sfntly-ed970d282fdc9b3e2582c10babfd6d9caa5d7984.tar.gz |
Added fix for operator= generation failure for CMapIdFilter on Windows.
Diffstat (limited to 'cpp/src/sfntly')
-rw-r--r-- | cpp/src/sfntly/table/core/cmap_table.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/cpp/src/sfntly/table/core/cmap_table.cc b/cpp/src/sfntly/table/core/cmap_table.cc index bbe4497..29bf3fe 100644 --- a/cpp/src/sfntly/table/core/cmap_table.cc +++ b/cpp/src/sfntly/table/core/cmap_table.cc @@ -84,16 +84,14 @@ CALLER_ATTACH CMapTable::CMap* CMapTable::GetCMap(const int32_t platform_id, CALLER_ATTACH CMapTable::CMap* CMapTable::GetCMap(const CMapTable::CMapId cmap_id) { - CMapIdFilter* id_filter = new CMapIdFilter(cmap_id); - CMapIterator cmap_iterator(this, id_filter); + CMapIdFilter id_filter(cmap_id); + CMapIterator cmap_iterator(this, &id_filter); // There can only be one cmap with a particular CMapId if (cmap_iterator.HasNext()) { Ptr<CMapTable::CMap> cmap; cmap.Attach(cmap_iterator.Next()); - delete id_filter; return cmap.Detach(); } - delete id_filter; #ifndef SFNTLY_NO_EXCEPTION throw NoSuchElementException(); #else |