summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorRye <rye@alchemyviewer.org>2025-11-28 13:49:27 -0500
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2025-11-30 19:22:22 +0200
commitafb1f4d692bb593b3f200d490dd3f8fdeab8d279 (patch)
tree3910d355ec29253ed18761fafdb16e0a99e4e4e7 /indra/newview
parentb3a1b099aa5ce7c02ccdb0fa5bc3d55ced989e5e (diff)
Replace boost noncopyable and undefined function usage with modern c++ deleted operator and constructor
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/lldrawable.h13
-rw-r--r--indra/newview/llface.h12
-rw-r--r--indra/newview/llinventorymodel.h5
-rw-r--r--indra/newview/llinventorymodelbackgroundfetch.cpp9
-rw-r--r--indra/newview/llmeshrepository.cpp33
-rw-r--r--indra/newview/llnotificationlistitem.h20
-rw-r--r--indra/newview/llspatialpartition.h24
-rw-r--r--indra/newview/lltexturefetch.cpp10
-rw-r--r--indra/newview/llviewerassetstats.h2
-rw-r--r--indra/newview/llviewerassetstorage.cpp2
10 files changed, 45 insertions, 85 deletions
diff --git a/indra/newview/lldrawable.h b/indra/newview/lldrawable.h
index a7ac9da618..6f6faf9909 100644
--- a/indra/newview/lldrawable.h
+++ b/indra/newview/lldrawable.h
@@ -67,17 +67,8 @@ class LLDrawable
public:
typedef std::vector<LLFace*> face_list_t;
- LLDrawable(const LLDrawable& rhs)
- : LLViewerOctreeEntryData(rhs)
- {
- *this = rhs;
- }
-
- const LLDrawable& operator=(const LLDrawable& rhs)
- {
- LL_ERRS() << "Illegal operation!" << LL_ENDL;
- return *this;
- }
+ LLDrawable(const LLDrawable& rhs) = delete;
+ const LLDrawable& operator=(const LLDrawable& rhs) = delete;
static void initClass();
diff --git a/indra/newview/llface.h b/indra/newview/llface.h
index db18f6643e..df31e9ea90 100644
--- a/indra/newview/llface.h
+++ b/indra/newview/llface.h
@@ -58,16 +58,8 @@ class alignas(16) LLFace
{
LL_ALIGN_NEW
public:
- LLFace(const LLFace& rhs)
- {
- *this = rhs;
- }
-
- const LLFace& operator=(const LLFace& rhs)
- {
- LL_ERRS() << "Illegal operation!" << LL_ENDL;
- return *this;
- }
+ LLFace(const LLFace& rhs) = delete;
+ const LLFace& operator=(const LLFace& rhs) = delete;
enum EMasks
{
diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h
index d28743357e..31345f3ab3 100644
--- a/indra/newview/llinventorymodel.h
+++ b/indra/newview/llinventorymodel.h
@@ -122,9 +122,8 @@ public:
FetchItemHttpHandler(const LLSD & request_sd);
virtual ~FetchItemHttpHandler();
- protected:
- FetchItemHttpHandler(const FetchItemHttpHandler &); // Not defined
- void operator=(const FetchItemHttpHandler &); // Not defined
+ FetchItemHttpHandler(const FetchItemHttpHandler&) = delete;
+ FetchItemHttpHandler& operator=(const FetchItemHttpHandler&) = delete;
public:
virtual void onCompleted(LLCore::HttpHandle handle, LLCore::HttpResponse * response);
diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp
index fa02b0f5ab..1e5f771ba7 100644
--- a/indra/newview/llinventorymodelbackgroundfetch.cpp
+++ b/indra/newview/llinventorymodelbackgroundfetch.cpp
@@ -125,9 +125,8 @@ public:
LLInventoryModelBackgroundFetch::instance().incrFetchCount(-1);
}
-protected:
- BGItemHttpHandler(const BGItemHttpHandler&); // Not defined
- void operator=(const BGItemHttpHandler&); // Not defined
+ BGItemHttpHandler(const BGItemHttpHandler&) = delete;
+ BGItemHttpHandler& operator=(const BGItemHttpHandler&) = delete;
};
@@ -159,8 +158,8 @@ public:
}
protected:
- BGFolderHttpHandler(const BGFolderHttpHandler&); // Not defined
- void operator=(const BGFolderHttpHandler&); // Not defined
+ BGFolderHttpHandler(const BGFolderHttpHandler&) = delete;
+ BGFolderHttpHandler& operator=(const BGFolderHttpHandler&) = delete;
public:
virtual void onCompleted(LLCore::HttpHandle handle, LLCore::HttpResponse* response);
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index c2ef8e5abc..c0b1a5326a 100644
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -654,12 +654,10 @@ public:
mRequestedBytes(requested_bytes)
{}
- virtual ~LLMeshHandlerBase()
- {}
+ virtual ~LLMeshHandlerBase() = default;
-protected:
- LLMeshHandlerBase(const LLMeshHandlerBase &); // Not defined
- void operator=(const LLMeshHandlerBase &); // Not defined
+ LLMeshHandlerBase(const LLMeshHandlerBase &) = delete;
+ LLMeshHandlerBase& operator=(const LLMeshHandlerBase&) = delete;
public:
virtual void onCompleted(LLCore::HttpHandle handle, LLCore::HttpResponse * response);
@@ -693,9 +691,8 @@ public:
}
virtual ~LLMeshHeaderHandler();
-protected:
- LLMeshHeaderHandler(const LLMeshHeaderHandler &); // Not defined
- void operator=(const LLMeshHeaderHandler &); // Not defined
+ LLMeshHeaderHandler(const LLMeshHeaderHandler&) = delete;
+ LLMeshHeaderHandler& operator=(const LLMeshHeaderHandler&) = delete;
public:
virtual void processData(LLCore::BufferArray * body, S32 body_offset, U8 * data, S32 data_size);
@@ -719,9 +716,8 @@ public:
}
virtual ~LLMeshLODHandler();
-protected:
- LLMeshLODHandler(const LLMeshLODHandler &); // Not defined
- void operator=(const LLMeshLODHandler &); // Not defined
+ LLMeshLODHandler(const LLMeshLODHandler&) = delete;
+ LLMeshLODHandler& operator=(const LLMeshLODHandler&) = delete;
public:
virtual void processData(LLCore::BufferArray * body, S32 body_offset, U8 * data, S32 data_size);
@@ -750,9 +746,8 @@ public:
}
virtual ~LLMeshSkinInfoHandler();
-protected:
- LLMeshSkinInfoHandler(const LLMeshSkinInfoHandler &); // Not defined
- void operator=(const LLMeshSkinInfoHandler &); // Not defined
+ LLMeshSkinInfoHandler(const LLMeshSkinInfoHandler&) = delete;
+ LLMeshSkinInfoHandler& operator=(const LLMeshSkinInfoHandler&) = delete;
void processSkin(U8* data, S32 data_size);
@@ -778,9 +773,8 @@ public:
{}
virtual ~LLMeshDecompositionHandler();
-protected:
- LLMeshDecompositionHandler(const LLMeshDecompositionHandler &); // Not defined
- void operator=(const LLMeshDecompositionHandler &); // Not defined
+ LLMeshDecompositionHandler(const LLMeshDecompositionHandler&) = delete;
+ LLMeshDecompositionHandler& operator=(const LLMeshDecompositionHandler&) = delete;
public:
virtual void processData(LLCore::BufferArray * body, S32 body_offset, U8 * data, S32 data_size);
@@ -804,9 +798,8 @@ public:
{}
virtual ~LLMeshPhysicsShapeHandler();
-protected:
- LLMeshPhysicsShapeHandler(const LLMeshPhysicsShapeHandler &); // Not defined
- void operator=(const LLMeshPhysicsShapeHandler &); // Not defined
+ LLMeshPhysicsShapeHandler(const LLMeshPhysicsShapeHandler&) = delete;
+ LLMeshPhysicsShapeHandler& operator=(const LLMeshPhysicsShapeHandler&) = delete;
public:
virtual void processData(LLCore::BufferArray * body, S32 body_offset, U8 * data, S32 data_size);
diff --git a/indra/newview/llnotificationlistitem.h b/indra/newview/llnotificationlistitem.h
index 2ed90e31b2..bddbe0ff16 100644
--- a/indra/newview/llnotificationlistitem.h
+++ b/indra/newview/llnotificationlistitem.h
@@ -156,8 +156,8 @@ protected:
LLTextBox* mGroupNameBoxExp;
private:
- LLGroupNotificationListItem(const LLGroupNotificationListItem &);
- LLGroupNotificationListItem & operator=(LLGroupNotificationListItem &);
+ LLGroupNotificationListItem(const LLGroupNotificationListItem&) = delete;
+ LLGroupNotificationListItem& operator=(LLGroupNotificationListItem&) = delete;
void setGroupName(std::string name);
bool updateFromCache();
@@ -175,8 +175,8 @@ public:
private:
friend class LLNotificationListItem;
LLGroupInviteNotificationListItem(const Params& p);
- LLGroupInviteNotificationListItem(const LLGroupInviteNotificationListItem &);
- LLGroupInviteNotificationListItem & operator=(LLGroupInviteNotificationListItem &);
+ LLGroupInviteNotificationListItem(const LLGroupInviteNotificationListItem&) = delete;
+ LLGroupInviteNotificationListItem& operator=(LLGroupInviteNotificationListItem&) = delete;
void setFee(S32 fee);
@@ -202,8 +202,8 @@ public:
private:
friend class LLNotificationListItem;
LLGroupNoticeNotificationListItem(const Params& p);
- LLGroupNoticeNotificationListItem(const LLGroupNoticeNotificationListItem &);
- LLGroupNoticeNotificationListItem & operator=(LLGroupNoticeNotificationListItem &);
+ LLGroupNoticeNotificationListItem(const LLGroupNoticeNotificationListItem&) = delete;
+ LLGroupNoticeNotificationListItem& operator=(LLGroupNoticeNotificationListItem&) = delete;
void setSender(std::string sender);
void onClickAttachment();
@@ -226,8 +226,8 @@ public:
private:
friend class LLNotificationListItem;
LLTransactionNotificationListItem(const Params& p);
- LLTransactionNotificationListItem(const LLTransactionNotificationListItem &);
- LLTransactionNotificationListItem & operator=(LLTransactionNotificationListItem &);
+ LLTransactionNotificationListItem(const LLTransactionNotificationListItem&) = delete;
+ LLTransactionNotificationListItem& operator=(LLTransactionNotificationListItem&) = delete;
LLAvatarIconCtrl* mAvatarIcon;
LLAvatarIconCtrl* mAvatarIconExp;
};
@@ -239,8 +239,8 @@ public:
private:
friend class LLNotificationListItem;
LLSystemNotificationListItem(const Params& p);
- LLSystemNotificationListItem(const LLSystemNotificationListItem &);
- LLSystemNotificationListItem & operator=(LLSystemNotificationListItem &);
+ LLSystemNotificationListItem(const LLSystemNotificationListItem&) = delete;
+ LLSystemNotificationListItem & operator=(LLSystemNotificationListItem &) = delete;
LLIconCtrl* mSystemNotificationIcon;
LLIconCtrl* mSystemNotificationIconExp;
bool mIsCaution;
diff --git a/indra/newview/llspatialpartition.h b/indra/newview/llspatialpartition.h
index 3aaa3d60e8..d8a94c8835 100644
--- a/indra/newview/llspatialpartition.h
+++ b/indra/newview/llspatialpartition.h
@@ -71,16 +71,8 @@ protected:
~LLDrawInfo();
public:
- LLDrawInfo(const LLDrawInfo& rhs)
- {
- *this = rhs;
- }
-
- const LLDrawInfo& operator=(const LLDrawInfo& rhs)
- {
- LL_ERRS() << "Illegal operation!" << LL_ENDL;
- return *this;
- }
+ LLDrawInfo(const LLDrawInfo& rhs) = delete;
+ const LLDrawInfo& operator=(const LLDrawInfo& rhs) = delete;
// return a hash of this LLDrawInfo as a debug color
LLColor4U getDebugColor() const;
@@ -206,16 +198,8 @@ class LLSpatialGroup : public LLOcclusionCullingGroup
friend class LLOctreeStateCheck;
public:
- LLSpatialGroup(const LLSpatialGroup& rhs) : LLOcclusionCullingGroup(rhs)
- {
- *this = rhs;
- }
-
- const LLSpatialGroup& operator=(const LLSpatialGroup& rhs)
- {
- LL_ERRS() << "Illegal operation!" << LL_ENDL;
- return *this;
- }
+ LLSpatialGroup(const LLSpatialGroup& rhs) = delete;
+ const LLSpatialGroup& operator=(const LLSpatialGroup& rhs) = delete;
static U32 sNodeCount;
static bool sNoDelete; //deletion of spatial groups and draw info not allowed if true
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index 631dd1bed4..51ade60827 100644
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -743,10 +743,10 @@ public:
: LLTextureFetch::TFRequest(),
mRegionHandle(region_handle)
{}
- TFReqSetRegion & operator=(const TFReqSetRegion &); // Not defined
+ TFReqSetRegion(const TFReqSetRegion&) = delete;
+ TFReqSetRegion& operator=(const TFReqSetRegion&) = delete;
- virtual ~TFReqSetRegion()
- {}
+ virtual ~TFReqSetRegion() = default;
virtual bool doWork(LLTextureFetch * fetcher);
@@ -793,7 +793,9 @@ public:
const LLUUID & session_id,
const LLUUID & agent_id,
LLSD& stats_sd);
- TFReqSendMetrics & operator=(const TFReqSendMetrics &); // Not defined
+
+ TFReqSendMetrics(const TFReqSendMetrics&) = delete;
+ TFReqSendMetrics& operator=(const TFReqSendMetrics&) = delete;
virtual ~TFReqSendMetrics();
diff --git a/indra/newview/llviewerassetstats.h b/indra/newview/llviewerassetstats.h
index de395da285..297d0a70ff 100644
--- a/indra/newview/llviewerassetstats.h
+++ b/indra/newview/llviewerassetstats.h
@@ -182,7 +182,7 @@ public:
LLViewerAssetStats(const LLViewerAssetStats &);
// Default destructor is correct.
- LLViewerAssetStats & operator=(const LLViewerAssetStats &); // Not defined
+ LLViewerAssetStats& operator=(const LLViewerAssetStats&) = delete;
// Clear all metrics data. This leaves the currently-active region
// in place but with zero'd data for all metrics. All other regions
diff --git a/indra/newview/llviewerassetstorage.cpp b/indra/newview/llviewerassetstorage.cpp
index 6b2f53c272..141f370ecb 100644
--- a/indra/newview/llviewerassetstorage.cpp
+++ b/indra/newview/llviewerassetstorage.cpp
@@ -68,7 +68,7 @@ public:
{
}
- LLViewerAssetRequest & operator=(const LLViewerAssetRequest &); // Not defined
+ LLViewerAssetRequest& operator=(const LLViewerAssetRequest&) = delete;
// Default assignment operator valid
// virtual