Skip to content

Commit ec93972

Browse files
fixup unit tests
1 parent b784b74 commit ec93972

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

genaisrc/myai.genai.mts

+2-1
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,11 @@ export async function invokeLLMOpt(code: string) {
199199
200200
Please modify the original code in <CODE> to ensure that it uses best practices for optimal code execution.
201201
202+
- do use for loops of the form for (auto const& x : container) { ... } instead of for (it = container.begin(); it != container.end(); ++it) { ... }.
202203
- do not use assert. Instead use SASSERT.
203204
- do not change function signatures.
204205
- do not use std::vector.
205-
- do not add new comments.
206+
- do not add new comments.
206207
- do not split functions into multiple functions.`
207208
}, {
208209
system: [],

src/math/lp/lar_core_solver.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,8 @@ class lar_core_solver {
8282
void backup_x() { m_backup_x = m_r_x; }
8383

8484
void restore_x() {
85+
m_r_x = m_backup_x;
8586
m_r_x.reserve(m_m());
86-
for (unsigned i = 0; i < std::min(m_m(), m_backup_x.size()); ++i)
87-
m_r_x[i] = m_backup_x[i];
8887
}
8988

9089
vector<impq> const& r_x() const { return m_r_x; }

0 commit comments

Comments
 (0)