diff options
author | dfilimon@google.com <dfilimon@google.com@672e30a5-4c29-85ac-ac6d-611c735e0a51> | 2011-09-15 19:22:43 +0000 |
---|---|---|
committer | dfilimon@google.com <dfilimon@google.com@672e30a5-4c29-85ac-ac6d-611c735e0a51> | 2011-09-15 19:22:43 +0000 |
commit | abb68accf47583a130eba5578baa89b4257e5679 (patch) | |
tree | f482eae6c81b767eb31fb2e32db230fa7fc2d937 | |
parent | 9b84c9cb838074805aa1d9931fe937304c92f0a3 (diff) | |
download | src-abb68accf47583a130eba5578baa89b4257e5679.tar.gz |
Added fix for operator= generation failure for CMapIdFilter on Windows.
git-svn-id: http://sfntly.googlecode.com/svn/trunk/cpp/src@78 672e30a5-4c29-85ac-ac6d-611c735e0a51
-rw-r--r-- | sfntly/table/core/cmap_table.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sfntly/table/core/cmap_table.cc b/sfntly/table/core/cmap_table.cc index bbe4497..29bf3fe 100644 --- a/sfntly/table/core/cmap_table.cc +++ b/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 |