Fabric: Using `unordered_map` instead of `map` for RawProps

Summary:
@public
We don't need to maintain an order of this collection, so using `unordered_map` is more appropriate.

Reviewed By: mdvacca

Differential Revision: D8826946

fbshipit-source-id: f6890097cc5d6a1e06f6b2cfd1b7d68a388da461
This commit is contained in:
Valentin Shergin 2018-07-17 22:41:37 -07:00 committed by Facebook Github Bot
parent 58da98149d
commit 88b8616437
1 changed files with 2 additions and 1 deletions

View File

@ -9,6 +9,7 @@
#include <memory>
#include <string>
#include <unordered_map>
#include <folly/dynamic.h>
@ -25,7 +26,7 @@ using InstanceHandle = struct InstanceHandleDummyStruct {} *;
* `RawProps` represents untyped map with props comes from JavaScript side.
*/
// TODO(T26954420): Use iterator as underlying type for RawProps.
using RawProps = std::map<std::string, folly::dynamic>;
using RawProps = std::unordered_map<std::string, folly::dynamic>;
using SharedRawProps = std::shared_ptr<const RawProps>;
/*