[ripple/rippled] Minor optimization of STObject::add (#2621)

HowardHinnant commented on this pull request.

> }

+ std::sort (entries.begin(), entries.end());

I share both of these concerns too. The lambda sort will also add a small bit of savings in code size (dropping a not-used compare).

Is a duplicate key a logic error or something that should be ignored? If logic error, assert, otherwise `std::unique` could be used on the sorted vector.

Добавить комментарий