diff options
| author | Douglas Rumbaugh <dbr4@psu.edu> | 2023-05-08 13:30:20 -0400 |
|---|---|---|
| committer | Douglas Rumbaugh <dbr4@psu.edu> | 2023-05-08 13:30:20 -0400 |
| commit | 5b1960ccbdda1a99ccd22638bb4721ee5c4c3331 (patch) | |
| tree | 5cae945f9c3e2713f091dccfb93108d186639711 /include/util/Cursor.h | |
| parent | 4c2e16fee80d1f2370d37b67b06f0c09cfa8d66d (diff) | |
| download | dynamic-extension-5b1960ccbdda1a99ccd22638bb4721ee5c4c3331.tar.gz | |
Record.h: Renamed record_t to Record for POSIX compliance.
Required for compliance with POSIX B.2.12.
The other _t types, key_t, val_t, header_t, etc. will be revised later
when switching over to a templated version of this code.
Diffstat (limited to 'include/util/Cursor.h')
| -rw-r--r-- | include/util/Cursor.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/util/Cursor.h b/include/util/Cursor.h index 3f5f20f..2879830 100644 --- a/include/util/Cursor.h +++ b/include/util/Cursor.h @@ -10,13 +10,13 @@ #pragma once #include "util/base.h" -#include "util/record.h" +#include "util/Record.h" #include "io/PagedFile.h" namespace de { struct Cursor { - record_t *ptr; - const record_t *end; + Record *ptr; + const Record *end; size_t cur_rec_idx; size_t rec_cnt; @@ -45,8 +45,8 @@ inline static bool advance_cursor(Cursor *cur, PagedFileIterator *iter = nullptr if (cur->ptr >= cur->end) { if (iter && iter->next()) { - cur->ptr = (record_t*)iter->get_item(); - cur->end = cur->ptr + (PAGE_SIZE / sizeof(record_t)); + cur->ptr = (Record*)iter->get_item(); + cur->end = cur->ptr + (PAGE_SIZE / sizeof(Record)); return true; } @@ -63,12 +63,12 @@ inline static bool advance_cursor(Cursor *cur, PagedFileIterator *iter = nullptr * largest is processed. */ inline static Cursor *get_next(std::vector<Cursor> &cursors, Cursor *current=&g_empty_cursor) { - const record_t *min_rec = nullptr; + const Record *min_rec = nullptr; Cursor *result = &g_empty_cursor; for (size_t i=0; i< cursors.size(); i++) { if (cursors[i] == g_empty_cursor) continue; - const record_t *rec = (&cursors[i] == current) ? cursors[i].ptr + 1 : cursors[i].ptr; + const Record *rec = (&cursors[i] == current) ? cursors[i].ptr + 1 : cursors[i].ptr; if (rec >= cursors[i].end) continue; if (min_rec == nullptr) { |