mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 16:40:38 +08:00
Add a comment about default constructed reference counts=
Change-Id: Ia6b8a75144755d9bcf05c893bb97a1e207da6b0f
This commit is contained in:
@@ -340,6 +340,9 @@ ResidualBlock* ProblemImpl::AddResidualBlock(
|
||||
}
|
||||
|
||||
if (options_.cost_function_ownership == TAKE_OWNERSHIP) {
|
||||
// Increment the reference count, creating an entry in the table if
|
||||
// needed. Note: C++ maps guarantee that new entries have default
|
||||
// constructed values; this implies integers are zero initialized.
|
||||
++cost_function_ref_count_[cost_function];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user