Skip to content

Commit 80981f6

Browse files
theIDinsiderocallahan
authored andcommitted
Tighten up some const-ness
1 parent ab36e5b commit 80981f6

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/ReplayTask.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,11 @@ void ReplayTask::validate_regs(uint32_t flags) {
131131
<< comparison;
132132
}
133133

134-
const TraceFrame& ReplayTask::current_trace_frame() {
134+
const TraceFrame& ReplayTask::current_trace_frame() const {
135135
return session().current_trace_frame();
136136
}
137137

138-
FrameTime ReplayTask::current_frame_time() {
138+
FrameTime ReplayTask::current_frame_time() const {
139139
return current_trace_frame().time();
140140
}
141141

src/ReplayTask.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ class ReplayTask final : public Task {
5858
* current trace record.
5959
*/
6060
void validate_regs(uint32_t flags = 0);
61-
const TraceFrame& current_trace_frame();
62-
FrameTime current_frame_time();
61+
const TraceFrame& current_trace_frame() const;
62+
FrameTime current_frame_time() const;
6363

6464
/** Restore the next chunk of this frame's saved data from the trace to this. */
6565
void apply_data_record_from_trace();

src/Session.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ struct BreakStatus {
135135
return result;
136136
}
137137

138-
bool any_break() {
138+
bool any_break() const {
139139
return !watchpoints_hit.empty() || signal || breakpoint_hit ||
140140
singlestep_complete || approaching_ticks_target;
141141
}

src/Task.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ class Task {
201201
* Updates tick count from the current performance counter values if
202202
* necessary.
203203
*/
204-
Ticks tick_count() { return ticks; }
204+
Ticks tick_count() const { return ticks; }
205205

206206
/**
207207
* Return the path of this fd as /proc/<pid>/fd/<fd>

0 commit comments

Comments
 (0)