Const qualify copy

This commit is contained in:
Liru Færs
2020-01-06 12:14:13 -05:00
parent af2ae76ca2
commit f73fb6424b
11 changed files with 13 additions and 13 deletions

View File

@@ -49,7 +49,7 @@ public:
virtual void cut() {};
virtual BOOL canCut() const { return FALSE; }
virtual void copy() {};
virtual void copy() const {};
virtual BOOL canCopy() const { return FALSE; }
virtual void paste() {};

View File

@@ -1119,7 +1119,7 @@ BOOL LLLineEditor::canCopy() const
// copy selection to clipboard
void LLLineEditor::copy()
void LLLineEditor::copy() const
{
if( canCopy() )
{

View File

@@ -107,7 +107,7 @@ public:
virtual void cut();
virtual BOOL canCut() const;
virtual void copy();
void copy() const override final;
virtual BOOL canCopy() const;
virtual void paste();

View File

@@ -2874,7 +2874,7 @@ LLView* LLScrollListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFac
// LLEditMenuHandler functions
// virtual
void LLScrollListCtrl::copy()
void LLScrollListCtrl::copy() const
{
std::string buffer;
for (auto item : getAllSelected())

View File

@@ -322,7 +322,7 @@ public:
virtual void scrollToShowSelected();
// LLEditMenuHandler functions
virtual void copy();
void copy() const override final;
virtual BOOL canCopy() const;
virtual void cut();
virtual BOOL canCut() const;

View File

@@ -2216,7 +2216,7 @@ BOOL LLTextEditor::canCopy() const
}
// copy selection to clipboard
void LLTextEditor::copy(bool raw)
void LLTextEditor::copy(bool raw) const
{
if( !canCopy() )
{

View File

@@ -129,9 +129,9 @@ public:
virtual BOOL canRedo() const;
virtual void cut();
virtual BOOL canCut() const;
void copy(bool raw);
void copyRaw() { copy(true); }
virtual void copy() { copy(false); }
void copy(bool raw) const;
void copyRaw() const { copy(true); }
void copy() const override final { copy(false); }
virtual BOOL canCopy() const;
virtual void paste();
virtual BOOL canPaste() const;

View File

@@ -1333,7 +1333,7 @@ BOOL LLFolderView::canCopy() const
}
// copy selected item
void LLFolderView::copy()
void LLFolderView::copy() const
{
// *NOTE: total hack to clear the inventory clipboard
LLInventoryClipboard::instance().reset();

View File

@@ -191,7 +191,7 @@ public:
// Copy & paste
virtual BOOL canCopy() const;
virtual void copy();
virtual void copy() const override final;
virtual BOOL canCut() const;
virtual void cut();

View File

@@ -3529,7 +3529,7 @@ LLViewerMediaImpl::canCut() const
////////////////////////////////////////////////////////////////////////////////
// virtual
void
LLViewerMediaImpl::copy()
LLViewerMediaImpl::copy() const
{
LLPluginClassMedia* mMediaSource = getMediaPlugin();
if (mMediaSource)

View File

@@ -339,7 +339,7 @@ public:
/*virtual*/ void cut() override;
/*virtual*/ BOOL canCut() const override;
/*virtual*/ void copy() override;
/*virtual*/ void copy() const override final;
/*virtual*/ BOOL canCopy() const override;
/*virtual*/ void paste() override;