Skip to content

Commit 00c9fcb

Browse files
author
Santiago
committed
remove unnecessary function
1 parent 7e4f6b3 commit 00c9fcb

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

TextEditor.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -300,12 +300,12 @@ void TextEditor::Paste()
300300
if (canPasteToMultipleCursors)
301301
{
302302
std::string clipSubText = clipText.substr(clipTextLines[c].first, clipTextLines[c].second - clipTextLines[c].first);
303-
InsertTextAtCursor(clipSubText, c);
303+
InsertTextAtCursor(clipSubText.c_str(), c);
304304
u.mOperations.push_back({ clipSubText, start, GetActualCursorCoordinates(c), UndoOperationType::Add });
305305
}
306306
else
307307
{
308-
InsertTextAtCursor(clipText, c);
308+
InsertTextAtCursor(clipText.c_str(), c);
309309
u.mOperations.push_back({ clipText, start, GetActualCursorCoordinates(c), UndoOperationType::Add });
310310
}
311311
}
@@ -732,11 +732,6 @@ int TextEditor::InsertTextAt(Coordinates& /* inout */ aWhere, const char* aValue
732732
return totalLines;
733733
}
734734

735-
void TextEditor::InsertTextAtCursor(const std::string& aValue, int aCursor)
736-
{
737-
InsertTextAtCursor(aValue.c_str(), aCursor);
738-
}
739-
740735
void TextEditor::InsertTextAtCursor(const char* aValue, int aCursor)
741736
{
742737
if (aValue == nullptr)

TextEditor.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,6 @@ class IMGUI_API TextEditor
332332
void SetCursorPosition(const Coordinates& aPosition, int aCursor = -1, bool aClearSelection = true);
333333

334334
int InsertTextAt(Coordinates& aWhere, const char* aValue);
335-
void InsertTextAtCursor(const std::string& aValue, int aCursor = -1);
336335
void InsertTextAtCursor(const char* aValue, int aCursor = -1);
337336

338337
enum class MoveDirection { Right = 0, Left = 1, Up = 2, Down = 3 };

0 commit comments

Comments
 (0)