aboutsummaryrefslogtreecommitdiff
path: root/source/Interpreter/CommandHistory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Interpreter/CommandHistory.cpp')
-rw-r--r--source/Interpreter/CommandHistory.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/source/Interpreter/CommandHistory.cpp b/source/Interpreter/CommandHistory.cpp
index 33971e3959c6..26996a625642 100644
--- a/source/Interpreter/CommandHistory.cpp
+++ b/source/Interpreter/CommandHistory.cpp
@@ -41,17 +41,17 @@ CommandHistory::FindString (const char* input_str) const
{
Mutex::Locker locker(m_mutex);
if (!input_str)
- return NULL;
+ return nullptr;
if (input_str[0] != g_repeat_char)
- return NULL;
+ return nullptr;
if (input_str[1] == '-')
{
bool success;
size_t idx = Args::StringToUInt32 (input_str+2, 0, 0, &success);
if (!success)
- return NULL;
+ return nullptr;
if (idx > m_history.size())
- return NULL;
+ return nullptr;
idx = m_history.size() - idx;
return m_history[idx].c_str();
@@ -59,7 +59,7 @@ CommandHistory::FindString (const char* input_str) const
else if (input_str[1] == g_repeat_char)
{
if (m_history.empty())
- return NULL;
+ return nullptr;
else
return m_history.back().c_str();
}
@@ -68,9 +68,9 @@ CommandHistory::FindString (const char* input_str) const
bool success;
uint32_t idx = Args::StringToUInt32 (input_str+1, 0, 0, &success);
if (!success)
- return NULL;
+ return nullptr;
if (idx >= m_history.size())
- return NULL;
+ return nullptr;
return m_history[idx].c_str();
}
}
@@ -81,7 +81,7 @@ CommandHistory::GetStringAtIndex (size_t idx) const
Mutex::Locker locker(m_mutex);
if (idx < m_history.size())
return m_history[idx].c_str();
- return NULL;
+ return nullptr;
}
const char*
@@ -95,7 +95,7 @@ CommandHistory::GetRecentmostString () const
{
Mutex::Locker locker(m_mutex);
if (m_history.empty())
- return NULL;
+ return nullptr;
return m_history.back().c_str();
}
@@ -137,7 +137,7 @@ CommandHistory::Dump (Stream& stream,
if (!hist_item.empty())
{
stream.Indent();
- stream.Printf ("%4zu: %s\n", counter, hist_item.c_str());
+ stream.Printf("%4" PRIu64 ": %s\n", (uint64_t)counter, hist_item.c_str());
}
}
}