Skip to content

Commit dd7883c

Browse files
committed
Fix compilation
1 parent 9582b2f commit dd7883c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/nlcore.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -507,15 +507,16 @@ size_t add_hessian_index(size_t x1, size_t x2, size_t &m_hessian_nnz,
507507
std::swap(x1, x2);
508508

509509
size_t hessian_index;
510-
auto iter = m_hessian_index_map.find(VariablePair(x1, x2));
510+
VariablePair varpair(x1, x2);
511+
auto iter = m_hessian_index_map.find(varpair);
511512
if (iter != m_hessian_index_map.end())
512513
{
513514
hessian_index = iter->second;
514515
}
515516
else
516517
{
517518
hessian_index = m_hessian_nnz;
518-
m_hessian_index_map[VariablePair(x1, x2)] = m_hessian_nnz;
519+
m_hessian_index_map[varpair] = m_hessian_nnz;
519520
m_hessian_rows.push_back(x1);
520521
m_hessian_cols.push_back(x2);
521522
m_hessian_nnz += 1;

0 commit comments

Comments
 (0)