nlohmann / json

JSON for Modern C++
https://json.nlohmann.me
MIT License
41.46k stars 6.59k forks source link

Ordered map remove duplicate codes #4057

Open Tomerkm opened 1 year ago

Tomerkm commented 1 year ago

[Describe your pull request here. Please read the text below the line, and make sure you follow the checklist.] I removed the code at the function: std::pair<iterator, bool> emplace(const key_type& key, T&& t) and replaced which a method that exists at the class and do the job.

The method find do the same as the iterate at the code does. Instead of writing the same code, I have called the method find. The idea is to use the function does the job instead of rewriting the same code.

I want to see if this ok before I change on the others.


Pull request checklist

Read the Contribution Guidelines for detailed information.

Please don't

github-actions[bot] commented 1 year ago

🔴 Amalgamation check failed! 🔴

The source code has not been amalgamated. @Tomerkm Please read and follow the Contribution Guidelines.

coveralls commented 1 year ago

Coverage Status

coverage: 100.0%. remained the same when pulling 87ae0e6b6dbc1ef4e86b3c30bf84d58e7f0b5ba8 on Tomerkm:ordered_map_remove_duplicate_codes into 5d2754306d67d1e654a1a34e1d2e74439a9d53b3 on nlohmann:develop.

nlohmann commented 9 months ago

(Also, please update from the develop branch as it has a working CI now.)