Remove m_bReadOnly from CTextLogger

User can't modify the log text, it can only be modified through code.
This commit is contained in:
Kawe Mazidjatari 2022-06-20 13:23:11 +02:00
parent 33aebfb89d
commit f52bfb139e
2 changed files with 0 additions and 16 deletions

View File

@ -126,8 +126,6 @@ public:
int GetTotalLines() const { return (int)m_Lines.size(); }
bool IsOverwrite() const { return m_Overwrite; }
void SetReadOnly(bool aValue);
bool IsReadOnly() const { return m_bReadOnly; }
bool IsCursorPositionChanged() const { return m_bCursorPositionChanged; }
Coordinates GetCursorPosition() const { return GetActualCursorCoordinates(); }
@ -211,7 +209,6 @@ private:
int m_nTabSize;
bool m_Overwrite;
bool m_bReadOnly;
bool m_bWithinRender;
bool m_bScrollToCursor;
float m_flTextStart; // position (in pixels) where a code line starts relative to the left of the TextEditor.

View File

@ -25,7 +25,6 @@ CTextLogger::CTextLogger()
: m_flLineSpacing(1.0f)
, m_nTabSize(4)
, m_Overwrite(false)
, m_bReadOnly(false)
, m_bWithinRender(false)
, m_bScrollToCursor(false)
, m_flTextStart(0.f)
@ -198,7 +197,6 @@ void CTextLogger::Advance(Coordinates & aCoordinates) const
void CTextLogger::DeleteRange(const Coordinates & aStart, const Coordinates & aEnd)
{
assert(aEnd >= aStart);
assert(!m_bReadOnly);
//printf("D(%d.%d)-(%d.%d)\n", aStart.mLine, aStart.mColumn, aEnd.mLine, aEnd.mColumn);
@ -235,8 +233,6 @@ void CTextLogger::DeleteRange(const Coordinates & aStart, const Coordinates & aE
int CTextLogger::InsertTextAt(Coordinates& /* inout */ aWhere, const char * aValue, ImVec4 aColor)
{
assert(!m_bReadOnly);
int cindex = GetCharacterIndex(aWhere);
int totalLines = 0;
@ -532,7 +528,6 @@ void CTextLogger::RemoveLine(int aStart, int aEnd)
{
m_Mutex.lock();
assert(!m_bReadOnly);
assert(aEnd >= aStart);
assert(m_Lines.size() > (size_t)(aEnd - aStart));
@ -546,7 +541,6 @@ void CTextLogger::RemoveLine(int aIndex)
{
m_Mutex.lock();
assert(!m_bReadOnly);
assert(m_Lines.size() > 1);
m_Lines.erase(m_Lines.begin() + aIndex);
@ -557,8 +551,6 @@ void CTextLogger::RemoveLine(int aIndex)
CTextLogger::Line& CTextLogger::InsertLine(int aIndex)
{
assert(!m_bReadOnly);
auto& result = *m_Lines.insert(m_Lines.begin() + aIndex, Line());
return result;
}
@ -964,11 +956,6 @@ void CTextLogger::SetTextLines(const std::vector<CConLog>& aLines)
}
}
void CTextLogger::SetReadOnly(bool aValue)
{
m_bReadOnly = aValue;
}
void CTextLogger::SetCursorPosition(const Coordinates & aPosition)
{
if (m_State.m_CursorPosition != aPosition)