Skip to content

Commit

Permalink
Const
Browse files Browse the repository at this point in the history
  • Loading branch information
jdksjolen committed Dec 16, 2024
1 parent 7830352 commit 9959052
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/hotspot/share/logging/circularStringBuffer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,13 @@ class CircularStringBuffer {
decorations(None) {
}

bool is_token() {
bool is_token() const {
return output == nullptr;
}
};

struct StalledMessage {
Message msg;
const Message msg;
const char* string;
StalledMessage(Message& msg, const char* string)
: msg(msg), string(string) {}
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/logging/logAsyncWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ bool AsyncLogWriter::write(char* write_buffer, size_t write_buffer_size) {
if (stalling_enabled) {
{
CircularStringBuffer::StallingLocker lock(&_circular_buffer);
CircularStringBuffer::StalledMessage* mptr = _circular_buffer.stalled_message();
const CircularStringBuffer::StalledMessage* mptr = _circular_buffer.stalled_message();
if (mptr != nullptr) {
const char* str = mptr->string;
assert(!mptr->msg.is_token(), "must");
Expand Down

0 comments on commit 9959052

Please sign in to comment.