| 1349 | |
| 1350 | |
| 1351 | sort_record* Sort::getRecord() |
| 1352 | { |
| 1353 | sort_record* record = NULL; |
| 1354 | |
| 1355 | // If there weren't any runs, everything fit in memory. Just return stuff. |
| 1356 | |
| 1357 | if (!m_merge) |
| 1358 | { |
| 1359 | while (true) |
| 1360 | { |
| 1361 | if (m_records == 0) |
| 1362 | { |
| 1363 | record = NULL; |
| 1364 | break; |
| 1365 | } |
| 1366 | m_records--; |
| 1367 | if ((record = *m_next_pointer++)) |
| 1368 | break; |
| 1369 | } |
| 1370 | } |
| 1371 | else |
| 1372 | record = getMerge(m_merge); |
| 1373 | |
| 1374 | return record; |
| 1375 | } |
| 1376 | |
| 1377 | |
| 1378 | void Sort::init() |
no outgoing calls
no test coverage detected