mirror of
https://github.com/rdkit/rdkit.git
synced 2026-06-07 22:44:25 +08:00
* RGD code cleanup - made an effort to give more meaningful names to variables (e.g., renamed most instances of attachment (point) to avoid ambiguity as attachment may be interpreted as either the R-group atom or its neighbor atom on the core, which are two different things) - replaced the old school removeAtom() method with begin/commitBatchEdit() - added std::move and std::make_move_iterator where relevant to avoid potential unintended copying - replaced instances of container.size() == 0 and !container.size() with container.empty() for better clarity - replaced std::map::find() with std::map::at() where the key was not needed - replaced expensive std::find_if with more efficient alternative - added some missing const keywords and added references to avoid copying where appropriate - replaced for loops with modern implicit looping alternatives where convenient - avoid calling MolToSmiles when VERBOSE is not defined as the result is anyway not used - removed "oops, exponential is a pain" code snippet as I believe 1. it is never executed 2. it is not tested 3. I do not think it is correct - removed check for data->matches.size() > 1 as I do not believe it is correct - Use std::unique_ptr::reset instead of defining a new std::unique_ptr and moving it to the original one * changes in response to review * change in response to review * replaced std::set with boost::dynamic_bitset to save time on std::set::insert and std::set::find * make sure we do not go out of bounds --------- Co-authored-by: ptosco <paolo.tosco@novartis.com>
3.7 KiB
3.7 KiB