Skip to content

Commit

Permalink
fix for first pair of None events for a dict event
Browse files Browse the repository at this point in the history
  • Loading branch information
burivuh authored and vicpopov committed Sep 11, 2019
1 parent cc4c398 commit 9620d89
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion snippets/c_api/iterate_events.cc
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ processed on the Python side as lists of pairs while converting them to dicts.
*/
std::vector<char const *> getPairs(std::map<std::string, std::string> const & eventPairs)
{
std::vector<char const *> pairs(eventPairs.size() * 2);
std::vector<char const *> pairs;
pairs.reserve(eventPairs.size() * 2);

for (auto const & kp : eventPairs)
{
Expand Down

0 comments on commit 9620d89

Please sign in to comment.