revert unwise data structure change

This commit is contained in:
Thomas Fussell 2018-07-24 23:08:44 -04:00
parent cbe50f4681
commit 8f39375f4c
3 changed files with 11 additions and 10 deletions

View File

@ -26,6 +26,7 @@
#include <functional>
#include <iterator>
#include <map>
#include <memory>
#include <string>
#include <unordered_map>
@ -760,15 +761,15 @@ public:
/// </summary>
std::size_t add_shared_string(const rich_text &shared, bool allow_duplicates = false);
/// <summary>
/// Returns a reference to the shared string ordered by id
/// </summary>
const std::unordered_map<std::size_t, rich_text> &shared_strings_by_id() const;
/// <summary>
/// Returns a reference to the shared string ordered by id
/// </summary>
const std::map<std::size_t, rich_text> &shared_strings_by_id() const;
/// <summary>
/// Returns a reference to the shared string related to the specified index
/// </summary>
const rich_text &shared_strings(std::size_t index) const;
/// <summary>
/// Returns a reference to the shared string related to the specified index
/// </summary>
const rich_text &shared_strings(std::size_t index) const;
/// <summary>
/// Returns a reference to the shared strings being used by cells

View File

@ -118,7 +118,7 @@ struct workbook_impl
std::list<worksheet_impl> worksheets_;
std::unordered_map<rich_text, std::size_t, rich_text_hash> shared_strings_ids_;
std::unordered_map<std::size_t, rich_text> shared_strings_values_;
std::map<std::size_t, rich_text> shared_strings_values_;
optional<stylesheet> stylesheet_;

View File

@ -1332,7 +1332,7 @@ const manifest &workbook::manifest() const
return d_->manifest_;
}
const std::unordered_map<std::size_t, rich_text> &workbook::shared_strings_by_id() const
const std::map<std::size_t, rich_text> &workbook::shared_strings_by_id() const
{
return d_->shared_strings_values_;
}