From 9f7dd0177201fe080c287144b99a70125be1fb2b Mon Sep 17 00:00:00 2001 From: Ansariel Hiller Date: Tue, 20 Aug 2024 17:41:48 +0200 Subject: Clean up boost includes and remove compiler warning pragma for unreachable code in PCH (#2361) --- indra/llappearance/lllocaltextureobject.h | 2 - indra/llcommon/lldoubledispatch.h | 1 - indra/llcommon/llerrorcontrol.h | 1 - indra/llcommon/llinitparam.h | 1 - indra/llcommon/llprocess.h | 1 - indra/llcommon/llrun.h | 1 - indra/llcommon/tests/lleventcoro_test.cpp | 2 - indra/llcommon/tests/llinstancetracker_test.cpp | 2 - indra/llcorehttp/bufferarray.h | 1 - indra/llcorehttp/httpcommon.h | 6 +-- indra/llimage/llimagej2c.cpp | 1 - indra/llimage/llimagej2c.h | 1 - indra/llmessage/lliopipe.h | 1 - indra/llmessage/llservice.h | 64 ------------------------- indra/llmessage/llstoredmessage.h | 1 - indra/llui/llnotifications.h | 1 + indra/newview/llagent.h | 1 - indra/newview/llagentwearables.cpp | 2 - indra/newview/llchannelmanager.h | 1 - indra/newview/llfloateruipreview.cpp | 1 - indra/newview/llinventorybridge.cpp | 2 - indra/newview/lllogininstance.cpp | 1 - indra/newview/lllogininstance.h | 1 - indra/newview/llpanellogin.h | 1 - indra/newview/llpathfindingmanager.cpp | 1 - indra/newview/llpathfindingnavmesh.h | 1 - indra/newview/llpathfindingnavmeshzone.cpp | 11 ----- indra/newview/llpathfindingnavmeshzone.h | 1 - indra/newview/llpathfindingobject.h | 1 - indra/newview/llpathfindingobjectlist.h | 2 - indra/newview/llscreenchannel.h | 1 - indra/newview/llviewerprecompiledheaders.h | 5 +- indra/newview/llviewerwindow.h | 1 - indra/newview/llvoiceclient.h | 1 - indra/newview/llwindowlistener.cpp | 1 - indra/newview/llxmlrpclistener.cpp | 6 +-- indra/test/llevents_tut.cpp | 1 - indra/test/test.cpp | 4 -- 38 files changed, 4 insertions(+), 130 deletions(-) diff --git a/indra/llappearance/lllocaltextureobject.h b/indra/llappearance/lllocaltextureobject.h index 5505ef205a..a1b1178dee 100644 --- a/indra/llappearance/lllocaltextureobject.h +++ b/indra/llappearance/lllocaltextureobject.h @@ -27,8 +27,6 @@ #ifndef LL_LOCALTEXTUREOBJECT_H #define LL_LOCALTEXTUREOBJECT_H -#include - #include "llpointer.h" #include "llgltexture.h" diff --git a/indra/llcommon/lldoubledispatch.h b/indra/llcommon/lldoubledispatch.h index c8c566205a..25039c3e9c 100644 --- a/indra/llcommon/lldoubledispatch.h +++ b/indra/llcommon/lldoubledispatch.h @@ -30,7 +30,6 @@ #define LL_LLDOUBLEDISPATCH_H #include -#include #include #include #include diff --git a/indra/llcommon/llerrorcontrol.h b/indra/llcommon/llerrorcontrol.h index 1845fc42db..0a7b3d2046 100644 --- a/indra/llcommon/llerrorcontrol.h +++ b/indra/llcommon/llerrorcontrol.h @@ -32,7 +32,6 @@ #include "llpointer.h" #include "llrefcount.h" #include "boost/function.hpp" -#include "boost/shared_ptr.hpp" #include class LLSD; diff --git a/indra/llcommon/llinitparam.h b/indra/llcommon/llinitparam.h index 206aa51ba3..32d7b17034 100644 --- a/indra/llcommon/llinitparam.h +++ b/indra/llcommon/llinitparam.h @@ -31,7 +31,6 @@ #include #include #include -#include #include #include #include diff --git a/indra/llcommon/llprocess.h b/indra/llcommon/llprocess.h index 166da8f424..39ed29c1b4 100644 --- a/indra/llcommon/llprocess.h +++ b/indra/llcommon/llprocess.h @@ -32,7 +32,6 @@ #include "llwin32headerslean.h" #include "llexception.h" #include "apr_thread_proc.h" -#include #include #include #include diff --git a/indra/llcommon/llrun.h b/indra/llcommon/llrun.h index 8061117ad5..70767572ff 100644 --- a/indra/llcommon/llrun.h +++ b/indra/llcommon/llrun.h @@ -30,7 +30,6 @@ #define LL_LLRUN_H #include -#include class LLRunnable; diff --git a/indra/llcommon/tests/lleventcoro_test.cpp b/indra/llcommon/tests/lleventcoro_test.cpp index a3c54ffaa2..ab174a8bde 100644 --- a/indra/llcommon/tests/lleventcoro_test.cpp +++ b/indra/llcommon/tests/lleventcoro_test.cpp @@ -30,8 +30,6 @@ #include #include #include -#include -#include #include "linden_common.h" diff --git a/indra/llcommon/tests/llinstancetracker_test.cpp b/indra/llcommon/tests/llinstancetracker_test.cpp index c6eb0fdf75..bf661dc051 100644 --- a/indra/llcommon/tests/llinstancetracker_test.cpp +++ b/indra/llcommon/tests/llinstancetracker_test.cpp @@ -37,8 +37,6 @@ #include // std::sort() #include // std headers -// external library headers -#include // other Linden headers #include "../test/lltut.h" diff --git a/indra/llcorehttp/bufferarray.h b/indra/llcorehttp/bufferarray.h index 0269d1785e..5105dbc4f7 100644 --- a/indra/llcorehttp/bufferarray.h +++ b/indra/llcorehttp/bufferarray.h @@ -30,7 +30,6 @@ #include #include -#include "boost/intrusive_ptr.hpp" #include "_refcounted.h" diff --git a/indra/llcorehttp/httpcommon.h b/indra/llcorehttp/httpcommon.h index 0a1c5ed101..511a17e000 100644 --- a/indra/llcorehttp/httpcommon.h +++ b/indra/llcorehttp/httpcommon.h @@ -189,13 +189,9 @@ #include "linden_common.h" // Modifies curl/curl.h interfaces #include "llsd.h" -#include "boost/intrusive_ptr.hpp" -#include "boost/shared_ptr.hpp" -#include "boost/weak_ptr.hpp" -#include "boost/function.hpp" -#include "boost/noncopyable.hpp" #include #include +#include "boost/noncopyable.hpp" namespace LLCore { diff --git a/indra/llimage/llimagej2c.cpp b/indra/llimage/llimagej2c.cpp index 42f3e92257..4ec95bbcc3 100644 --- a/indra/llimage/llimagej2c.cpp +++ b/indra/llimage/llimagej2c.cpp @@ -31,7 +31,6 @@ #include "llmath.h" #include "llmemory.h" #include "llsd.h" -#include // Declare the prototype for this factory function here. It is implemented in // other files which define a LLImageJ2CImpl subclass, but only ONE static diff --git a/indra/llimage/llimagej2c.h b/indra/llimage/llimagej2c.h index 2a32e10bac..19744a7f87 100644 --- a/indra/llimage/llimagej2c.h +++ b/indra/llimage/llimagej2c.h @@ -30,7 +30,6 @@ #include "llimage.h" #include "llassettype.h" #include "llmetricperformancetester.h" -#include // JPEG2000 : compression rate used in j2c conversion. const F32 DEFAULT_COMPRESSION_RATE = 1.f/8.f; diff --git a/indra/llmessage/lliopipe.h b/indra/llmessage/lliopipe.h index a58ee045c2..1887b5cd9a 100644 --- a/indra/llmessage/lliopipe.h +++ b/indra/llmessage/lliopipe.h @@ -30,7 +30,6 @@ #define LL_LLIOPIPE_H #include -#include #include "llwin32headerslean.h" #include "apr_poll.h" diff --git a/indra/llmessage/llservice.h b/indra/llmessage/llservice.h index 6c32fa8102..7853e357f9 100644 --- a/indra/llmessage/llservice.h +++ b/indra/llmessage/llservice.h @@ -31,72 +31,10 @@ #include #include -//#include -//#include -//#include "llframetimer.h" #include "lliopipe.h" #include "llchainio.h" -#if 0 -class LLServiceCreator; -/** - * intrusive pointer support - */ -namespace boost -{ - void intrusive_ptr_add_ref(LLServiceCreator* p); - void intrusive_ptr_release(LLServiceCreator* p); -}; -#endif - -/** - * @class LLServiceCreator - * @brief This class is an abstract base class for classes which create - * new LLService instances. - * - * Derive classes from this class which appropriately implement the - * operator() and destructor. - * @see LLService - */ -#if 0 -class LLServiceCreator -{ -public: - typedef boost::intrusive_ptr service_t; - virtual ~LLServiceCreator() {} - virtual service_t activate() = 0; - virtual void discard() = 0; - -protected: - LLServiceCreator() : mReferenceCount(0) - { - } - -private: - friend void boost::intrusive_ptr_add_ref(LLServiceCreator* p); - friend void boost::intrusive_ptr_release(LLServiceCreator* p); - U32 mReferenceCount; -}; -#endif - -#if 0 -namespace boost -{ - inline void intrusive_ptr_add_ref(LLServiceCreator* p) - { - ++p->mReferenceCount; - } - inline void intrusive_ptr_release(LLServiceCreator* p) - { - if(p && 0 == --p->mReferenceCount) - { - delete p; - } - } -}; -#endif - /** * @class LLService * @brief This class is the base class for the service classes. @@ -114,8 +52,6 @@ namespace boost class LLService : public LLIOPipe { public: - //typedef boost::intrusive_ptr creator_t; - //typedef boost::intrusive_ptr service_t; typedef std::shared_ptr creator_t; /** diff --git a/indra/llmessage/llstoredmessage.h b/indra/llmessage/llstoredmessage.h index 178b75ab04..2bd64fafd7 100644 --- a/indra/llmessage/llstoredmessage.h +++ b/indra/llmessage/llstoredmessage.h @@ -29,7 +29,6 @@ #include "linden_common.h" #include "llsd.h" -#include #include diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h index 1a197f8a17..46286457cf 100644 --- a/indra/llui/llnotifications.h +++ b/indra/llui/llnotifications.h @@ -87,6 +87,7 @@ #include #include #include +#include #include "llevents.h" #include "llfunctorregistry.h" diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index 9cd3e80f69..8f892025c9 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -40,7 +40,6 @@ #include "llcorehttputil.h" #include -#include #include extern const bool ANIMATE; diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index faa5d801dd..cd4222dddf 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -52,8 +52,6 @@ #include "llwearablelist.h" #include "llfloaterperms.h" -#include - LLAgentWearables gAgentWearables; bool LLAgentWearables::mInitialWearablesUpdateReceived = false; diff --git a/indra/newview/llchannelmanager.h b/indra/newview/llchannelmanager.h index 7a4899f1f3..4db7f32b10 100644 --- a/indra/newview/llchannelmanager.h +++ b/indra/newview/llchannelmanager.h @@ -33,7 +33,6 @@ #include "lluuid.h" #include -#include namespace LLNotificationsUI { diff --git a/indra/newview/llfloateruipreview.cpp b/indra/newview/llfloateruipreview.cpp index 7c49db9c54..990a299c50 100644 --- a/indra/newview/llfloateruipreview.cpp +++ b/indra/newview/llfloateruipreview.cpp @@ -64,7 +64,6 @@ // Boost (for linux/unix command-line execv) #include -#include // External utility #include diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 8f3dc3ce16..c86492f005 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -85,8 +85,6 @@ #include "llenvironment.h" -#include - void copy_slurl_to_clipboard_callback_inv(const std::string& slurl); const F32 SOUND_GAIN = 1.0f; diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp index f37926a938..c54d2c080f 100644 --- a/indra/newview/lllogininstance.cpp +++ b/indra/newview/lllogininstance.cpp @@ -57,7 +57,6 @@ #include "llsdserialize.h" #include "lltrans.h" -#include #include #include diff --git a/indra/newview/lllogininstance.h b/indra/newview/lllogininstance.h index 0ec7b3bb24..624408d46d 100644 --- a/indra/newview/lllogininstance.h +++ b/indra/newview/lllogininstance.h @@ -29,7 +29,6 @@ #include "lleventdispatcher.h" #include "lleventapi.h" -#include #include #include // std::shared_ptr #include "llsecapi.h" diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h index 00fd17badf..a1bf25fb05 100644 --- a/indra/newview/llpanellogin.h +++ b/indra/newview/llpanellogin.h @@ -30,7 +30,6 @@ #include "llpanel.h" #include "llpointer.h" // LLPointer<> #include "llmediactrl.h" // LLMediaCtrlObserver -#include class LLLineEditor; class LLUIImage; diff --git a/indra/newview/llpathfindingmanager.cpp b/indra/newview/llpathfindingmanager.cpp index 5e7bc4fb3b..84a62b3cbf 100644 --- a/indra/newview/llpathfindingmanager.cpp +++ b/indra/newview/llpathfindingmanager.cpp @@ -35,7 +35,6 @@ #include #include -#include #include #include "llagent.h" diff --git a/indra/newview/llpathfindingnavmesh.h b/indra/newview/llpathfindingnavmesh.h index 18b6a31845..d838a1a51c 100644 --- a/indra/newview/llpathfindingnavmesh.h +++ b/indra/newview/llpathfindingnavmesh.h @@ -29,7 +29,6 @@ #include -#include #include #include diff --git a/indra/newview/llpathfindingnavmeshzone.cpp b/indra/newview/llpathfindingnavmeshzone.cpp index 012cc11eee..e9ef170176 100644 --- a/indra/newview/llpathfindingnavmeshzone.cpp +++ b/indra/newview/llpathfindingnavmeshzone.cpp @@ -30,20 +30,9 @@ #include "llpathfindingnavmeshzone.h" -#include - -#include -#include -#include -#include - #include "llagent.h" #include "llpathfindingmanager.h" -#include "llpathfindingnavmesh.h" -#include "llpathfindingnavmeshstatus.h" #include "llpathinglib.h" -#include "llsd.h" -#include "lluuid.h" #include "llviewercontrol.h" #include "llviewerregion.h" diff --git a/indra/newview/llpathfindingnavmeshzone.h b/indra/newview/llpathfindingnavmeshzone.h index a2c8691391..e770efa0d0 100644 --- a/indra/newview/llpathfindingnavmeshzone.h +++ b/indra/newview/llpathfindingnavmeshzone.h @@ -29,7 +29,6 @@ #include -#include #include #include diff --git a/indra/newview/llpathfindingobject.h b/indra/newview/llpathfindingobject.h index 17f12efd83..79a796dd60 100644 --- a/indra/newview/llpathfindingobject.h +++ b/indra/newview/llpathfindingobject.h @@ -29,7 +29,6 @@ #include -#include #include #include diff --git a/indra/newview/llpathfindingobjectlist.h b/indra/newview/llpathfindingobjectlist.h index 654423183e..cfcd43dc1d 100644 --- a/indra/newview/llpathfindingobjectlist.h +++ b/indra/newview/llpathfindingobjectlist.h @@ -30,8 +30,6 @@ #include #include -#include - #include "llpathfindingobject.h" class LLPathfindingObjectList; diff --git a/indra/newview/llscreenchannel.h b/indra/newview/llscreenchannel.h index 22fb41e559..651483dbe3 100644 --- a/indra/newview/llscreenchannel.h +++ b/indra/newview/llscreenchannel.h @@ -30,7 +30,6 @@ #include "lltoast.h" #include -#include namespace LLNotificationsUI { diff --git a/indra/newview/llviewerprecompiledheaders.h b/indra/newview/llviewerprecompiledheaders.h index 7c8067ede3..a857887247 100644 --- a/indra/newview/llviewerprecompiledheaders.h +++ b/indra/newview/llviewerprecompiledheaders.h @@ -42,10 +42,7 @@ #include #include #include - -#ifdef LL_WINDOWS -#pragma warning (3 : 4702) // we like level 3, not 4 -#endif +#include // Library headers from llcommon project: #include "indra_constants.h" diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index 395d8c78da..1b995ea650 100644 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -50,7 +50,6 @@ #include #include -#include class LLView; class LLViewerObject; diff --git a/indra/newview/llvoiceclient.h b/indra/newview/llvoiceclient.h index 2221bc6df4..3476571ca4 100644 --- a/indra/newview/llvoiceclient.h +++ b/indra/newview/llvoiceclient.h @@ -38,7 +38,6 @@ class LLVOAvatar; #include "llcallingcard.h" // for LLFriendObserver #include "llsecapi.h" #include "llcontrol.h" -#include // devices diff --git a/indra/newview/llwindowlistener.cpp b/indra/newview/llwindowlistener.cpp index 6221d67b26..ebcdd537a5 100644 --- a/indra/newview/llwindowlistener.cpp +++ b/indra/newview/llwindowlistener.cpp @@ -43,7 +43,6 @@ #include "stringize.h" #include #include -#include #include LLWindowListener::LLWindowListener(LLViewerWindow *window, const KeyboardGetter& kbgetter) diff --git a/indra/newview/llxmlrpclistener.cpp b/indra/newview/llxmlrpclistener.cpp index 7c7bd98bcd..92e6c88752 100644 --- a/indra/newview/llxmlrpclistener.cpp +++ b/indra/newview/llxmlrpclistener.cpp @@ -34,10 +34,6 @@ // STL headers #include #include -// std headers -// external library headers -#include -#include // boost::begin(), boost::end() #include "curl/curl.h" @@ -334,7 +330,7 @@ public: // need to wake up the loginCoro now llcoro::suspend(); - // Because mTransaction is a boost::scoped_ptr, deleting this object + // Because mTransaction is a std::unique_ptr, deleting this object // frees our LLXMLRPCTransaction object. // Because mBoundListener is an LLTempBoundListener, deleting this // object disconnects it from "mainloop". diff --git a/indra/test/llevents_tut.cpp b/indra/test/llevents_tut.cpp index 875ca9ad89..bf5cd3f853 100644 --- a/indra/test/llevents_tut.cpp +++ b/indra/test/llevents_tut.cpp @@ -44,7 +44,6 @@ #include // external library headers #include -#include #include // other Linden headers #include "tests/listener.h" // must PRECEDE lltut.h diff --git a/indra/test/test.cpp b/indra/test/test.cpp index 233eee5c31..172b6e3542 100644 --- a/indra/test/test.cpp +++ b/indra/test/test.cpp @@ -55,10 +55,6 @@ #include #include -#include -#include -#include -#include #include -- cgit v1.2.3