Skip to content

Commit fbfa0fc

Browse files
committed
Fix uninitialize variable
1 parent 79119dc commit fbfa0fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: ifopt_core/src/composite.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ Composite::RowIndicesHessiansPair Composite::GetHessians() const
190190
std::vector<Hessian>& hessians = row_indices_hessians_pair.second;
191191
hessians.reserve(GetRows()); // reserve space in the vector to avoid reallocations
192192

193-
int offset; // offset for row indices in different component
193+
int offset = 0; // offset for row indices in different component
194194
for (const auto& c : components_) {
195195
const RowIndicesHessiansPair& local_row_indices_hessians = c->GetHessians();
196196
const std::vector<int>& row_indices = local_row_indices_hessians.first;

0 commit comments

Comments
 (0)