diff --git a/.github/labeler.yaml b/.github/labeler.yaml
index 5a6590d4aac..6359419ba67 100644
--- a/.github/labeler.yaml
+++ b/.github/labeler.yaml
@@ -1,81 +1,109 @@
llappearance:
- - indra/llappearance/**/*
+- changed-files:
+ - any-glob-to-any-file: indra/llappearance/**
llaudio:
- - indra/llaudio/**/*
+- changed-files:
+ - any-glob-to-any-file: indra/llaudio/**
llcharacter:
- - indra/llcharacter/**/*
+- changed-files:
+ - any-glob-to-any-file: indra/llcharacter/**
llcommon:
- - indra/llcommon/**/*
+- changed-files:
+ - any-glob-to-any-file: indra/llcommon/**
llcorehttp:
- - indra/llcorehttp/**/*
+- changed-files:
+ - any-glob-to-any-file: indra/llcorehttp/**
llcrashlogger:
- - indra/llcrashlogger/**/*
+- changed-files:
+ - any-glob-to-any-file: indra/llcrashlogger/**
llfilesystem:
- - indra/llfilesystem/**/*
+- changed-files:
+ - any-glob-to-any-file: indra/llfilesystem/**
llimage:
- - indra/llimage/**/*
+- changed-files:
+ - any-glob-to-any-file: indra/llimage/**
llimagej2coj:
- - indra/llimagej2coj/**/*
+- changed-files:
+ - any-glob-to-any-file: indra/llimagej2coj/**
llinventory:
- - indra/llinventory/**/*
+- changed-files:
+ - any-glob-to-any-file: indra/llinventory/**
llkdu:
- - indra/llkdu/**/*
+- changed-files:
+ - any-glob-to-any-file: indra/llkdu/**
llmath:
- - indra/llmath/**/*
+- changed-files:
+ - any-glob-to-any-file: indra/llmath/**
llmeshoptimizer:
- - indra/llmeshoptimizer/**/*
+- changed-files:
+ - any-glob-to-any-file: indra/llmeshoptimizer/**
llmessage:
- - indra/llmessage/**/*
+- changed-files:
+ - any-glob-to-any-file: indra/llmessage/**
llplugin:
- - indra/llplugin/**/*
+- changed-files:
+ - any-glob-to-any-file: indra/llplugin/**
llprimitive:
- - indra/llprimitive/**/*
+- changed-files:
+ - any-glob-to-any-file: indra/llprimitive/**
llrender:
- - indra/llrender/**/*
+- changed-files:
+ - any-glob-to-any-file: indra/llrender/**
llui:
- - indra/llui/**/*
+- changed-files:
+ - any-glob-to-any-file: indra/llui/**
llwindow:
- - indra/llwindow/**/*
+- changed-files:
+ - any-glob-to-any-file: indra/llwindow/**
llxml:
- - indra/llxml/**/*
+- changed-files:
+ - any-glob-to-any-file: indra/llxml/**
cmake:
- - '**/*.cmake'
- - '**/*/cmake/*'
- - '**/CMakeLists.txt'
+- changed-files:
+ - any-glob-to-any-file:
+ - '**/*.cmake'
+ - '**/*/cmake/*'
+ - '**/CMakeLists.txt'
python:
- - '**/*.py'
+- changed-files:
+ - any-glob-to-any-file: '**/*.py'
c/cpp:
- - '**/*.c'
- - '**/*.cpp'
- - '**/*.cxx'
- - '**/*.h'
- - '**/*.hpp'
- - '**/*.hxx'
- - '**/*.i'
- - '**/*.inl'
- - '**/*.y'
-
-'team:viewer':
- - '*'
+- changed-files:
+ - any-glob-to-any-file:
+ - '**/*.c'
+ - '**/*.cpp'
+ - '**/*.cxx'
+ - '**/*.h'
+ - '**/*.hpp'
+ - '**/*.hxx'
+ - '**/*.i'
+ - '**/*.inl'
+ - '**/*.y'
+
+objc:
+- changed-files:
+ - any-glob-to-any-file:
+ - '**/*.m'
+ - '**/*.mm'
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 4c948e55864..4c8d98ce2f6 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -91,7 +91,7 @@ jobs:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- name: Setup python
- uses: actions/setup-python@v5
+ uses: actions/setup-python@v6
with:
python-version: "3.11"
- name: Checkout build variables
@@ -362,8 +362,9 @@ jobs:
post-windows-symbols:
env:
- BUGSPLAT_USER: ${{ secrets.BUGSPLAT_USER }}
- BUGSPLAT_PASS: ${{ secrets.BUGSPLAT_PASS }}
+ BUGSPLAT_DATABASE: "${{ secrets.BUGSPLAT_DATABASE }}"
+ SYMBOL_UPLOAD_CLIENT_ID: "${{ secrets.BUGSPLAT_SYMBOL_UPLOAD_CLIENT_ID }}"
+ SYMBOL_UPLOAD_CLIENT_SECRET: "${{ secrets.BUGSPLAT_SYMBOL_UPLOAD_CLIENT_SECRET }}"
needs: build
if: needs.build.outputs.configuration == 'Release'
runs-on: ubuntu-latest
@@ -374,51 +375,56 @@ jobs:
name: Windows-app
path: _artifacts
- name: Download Windows Symbols
- if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS
+ if: env.BUGSPLAT_DATABASE && env.SYMBOL_UPLOAD_CLIENT_ID
uses: actions/download-artifact@v4
with:
name: Windows-symbols
- name: Extract viewer pdb
- if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS
+ if: env.BUGSPLAT_DATABASE && env.SYMBOL_UPLOAD_CLIENT_ID
shell: bash
run: |
tar -xJf "${{ needs.build.outputs.viewer_channel }}.sym.tar.xz" -C _artifacts
- name: Post Windows symbols
- if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS
- uses: secondlife-3p/symbol-upload@v10
+ if: env.BUGSPLAT_DATABASE && env.SYMBOL_UPLOAD_CLIENT_ID
+ uses: BugSplat-Git/symbol-upload@095d163ae9ceb006d286a731dcd35cf6a1b458c8
with:
- username: ${{ env.BUGSPLAT_USER }}
- password: ${{ env.BUGSPLAT_PASS }}
- database: "SecondLife_Viewer_2018"
+ clientId: "${{ env.SYMBOL_UPLOAD_CLIENT_ID }}"
+ clientSecret: "${{ env.SYMBOL_UPLOAD_CLIENT_SECRET }}"
+ database: "${{ env.BUGSPLAT_DATABASE }}"
application: ${{ needs.build.outputs.viewer_channel }}
version: ${{ needs.build.outputs.viewer_version }}
directory: _artifacts
files: "**/{SecondLifeViewer.exe,llwebrtc.dll,*.pdb}"
+ node-version: "22"
+ dumpSyms: false
post-mac-symbols:
env:
- BUGSPLAT_USER: ${{ secrets.BUGSPLAT_USER }}
- BUGSPLAT_PASS: ${{ secrets.BUGSPLAT_PASS }}
+ BUGSPLAT_DATABASE: "${{ secrets.BUGSPLAT_DATABASE }}"
+ SYMBOL_UPLOAD_CLIENT_ID: "${{ secrets.BUGSPLAT_SYMBOL_UPLOAD_CLIENT_ID }}"
+ SYMBOL_UPLOAD_CLIENT_SECRET: "${{ secrets.BUGSPLAT_SYMBOL_UPLOAD_CLIENT_SECRET }}"
needs: build
if: needs.build.outputs.configuration == 'Release'
runs-on: ubuntu-latest
steps:
- name: Download Mac Symbols
- if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS
+ if: env.BUGSPLAT_DATABASE && env.SYMBOL_UPLOAD_CLIENT_ID
uses: actions/download-artifact@v4
with:
name: macOS-symbols
- name: Post Mac symbols
- if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS
- uses: secondlife-3p/symbol-upload@v10
+ if: env.BUGSPLAT_DATABASE && env.SYMBOL_UPLOAD_CLIENT_ID
+ uses: BugSplat-Git/symbol-upload@095d163ae9ceb006d286a731dcd35cf6a1b458c8
with:
- username: ${{ env.BUGSPLAT_USER }}
- password: ${{ env.BUGSPLAT_PASS }}
- database: "SecondLife_Viewer_2018"
+ clientId: "${{ env.SYMBOL_UPLOAD_CLIENT_ID }}"
+ clientSecret: "${{ env.SYMBOL_UPLOAD_CLIENT_SECRET }}"
+ database: "${{ env.BUGSPLAT_DATABASE }}"
application: ${{ needs.build.outputs.viewer_channel }}
version: ${{ needs.build.outputs.viewer_version }} (${{ needs.build.outputs.viewer_version }})
directory: .
files: "**/*.xcarchive.zip"
+ node-version: "22"
+ dumpSyms: false
release:
needs: [setup, build, sign-and-package-windows, sign-and-package-mac]
diff --git a/.github/workflows/check-pr.yaml b/.github/workflows/check-pr.yaml
index a5cee9157c7..08e907e83f5 100644
--- a/.github/workflows/check-pr.yaml
+++ b/.github/workflows/check-pr.yaml
@@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check PR description
- uses: actions/github-script@v7
+ uses: actions/github-script@v8
with:
script: |
const description = context.payload.pull_request.body || '';
diff --git a/.github/workflows/cla.yaml b/.github/workflows/cla.yaml
index 627ba512c41..5b31c584d50 100644
--- a/.github/workflows/cla.yaml
+++ b/.github/workflows/cla.yaml
@@ -23,4 +23,4 @@ jobs:
path-to-signatures: signatures.json
remote-organization-name: secondlife
remote-repository-name: cla-signatures
- allowlist: callum@mbp.localdomain,rye@lindenlab.com,rye
+ allowlist: callum@mbp.localdomain,rye@lindenlab.com,rye,bot*
diff --git a/.github/workflows/label.yaml b/.github/workflows/label.yaml
index 6e41d8aa2d8..218327ef470 100644
--- a/.github/workflows/label.yaml
+++ b/.github/workflows/label.yaml
@@ -9,7 +9,7 @@ jobs:
pull-requests: write
runs-on: ubuntu-latest
steps:
- - uses: actions/labeler@v4
+ - uses: actions/labeler@v6
with:
configuration-path: .github/labeler.yaml
repo-token: "${{ secrets.GITHUB_TOKEN }}"
diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml
index 726e1cd889b..8f942fa11bc 100644
--- a/.github/workflows/pre-commit.yaml
+++ b/.github/workflows/pre-commit.yaml
@@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- - uses: actions/setup-python@v4
+ - uses: actions/setup-python@v6
with:
python-version: 3.x
- uses: pre-commit/action@v3.0.1
diff --git a/.github/workflows/stale.yaml b/.github/workflows/stale.yaml
index f77151a815f..edfe71b6930 100644
--- a/.github/workflows/stale.yaml
+++ b/.github/workflows/stale.yaml
@@ -12,7 +12,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- - uses: actions/stale@v6
+ - uses: actions/stale@v10
id: stale
with:
stale-pr-message: This pull request is stale because it has been open 30 days with no activity. Remove stale label or comment or it will be closed in 7 days
diff --git a/.github/workflows/tag-release.yaml b/.github/workflows/tag-release.yaml
index 24ee2de7949..2922065f995 100644
--- a/.github/workflows/tag-release.yaml
+++ b/.github/workflows/tag-release.yaml
@@ -35,7 +35,7 @@ jobs:
echo NIGHTLY_DATE=${NIGHTLY_DATE} >> ${GITHUB_ENV}
echo TAG_ID="$(echo ${{ github.sha }} | cut -c1-8)-${{ inputs.project || '${NIGHTLY_DATE}' }}" >> ${GITHUB_ENV}
- name: Update Tag
- uses: actions/github-script@v7.0.1
+ uses: actions/github-script@v8
with:
# use a real access token instead of GITHUB_TOKEN default.
# required so that the results of this tag creation can trigger the build workflow
diff --git a/autobuild.xml b/autobuild.xml
index 2983307cbe6..d58a785b6b6 100644
--- a/autobuild.xml
+++ b/autobuild.xml
@@ -46,11 +46,11 @@
archive
name
darwin64
@@ -60,11 +60,11 @@
archive
name
linux64
@@ -74,11 +74,11 @@
archive
name
windows64
@@ -91,7 +91,7 @@
copyright
Copyright © 2012 The Apache Software Foundation, Licensed under the Apache License, Version 2.0.
version
- 1.7.5-12259255574
+ 1.7.5-18696779749
name
apr_suite
description
@@ -166,11 +166,11 @@
archive
name
darwin64
@@ -180,11 +180,11 @@
archive
name
windows64
diff --git a/indra/cmake/APR.cmake b/indra/cmake/APR.cmake
index 310659686dc..e0807a7d19d 100644
--- a/indra/cmake/APR.cmake
+++ b/indra/cmake/APR.cmake
@@ -31,8 +31,3 @@ if(DARWIN)
endif()
target_include_directories(ll::apr SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/apr-1)
-
-# Fix erroneous check for __attribute__ definition introduced with APR 1.7.5, causing lots of "this declaration may not have extern 'C' linkage" errors in VS
-file(READ ${LIBS_PREBUILT_DIR}/include/apr-1/apr.h APR_HEADER_CONTENTS)
-string(REPLACE "#if !(defined(__attribute__) || defined(__has_attribute))" "#if !defined(__attribute__)" APR_HEADER_CONTENTS "${APR_HEADER_CONTENTS}")
-file(WRITE ${LIBS_PREBUILT_DIR}/include/apr-1/apr.h "${APR_HEADER_CONTENTS}")
diff --git a/indra/cmake/bugsplat.cmake b/indra/cmake/bugsplat.cmake
index 509981d72cd..d2a8fcca46a 100644
--- a/indra/cmake/bugsplat.cmake
+++ b/indra/cmake/bugsplat.cmake
@@ -23,8 +23,14 @@ if (USE_BUGSPLAT)
elseif (DARWIN)
find_library(BUGSPLAT_LIBRARIES BugsplatMac REQUIRED
NO_DEFAULT_PATH PATHS "${ARCH_PREBUILT_DIRS_RELEASE}")
+ find_library(CRASHREPORTED_LIBRARIES CrashReporter REQUIRED
+ NO_DEFAULT_PATH PATHS "${ARCH_PREBUILT_DIRS_RELEASE}")
+ find_library(HOCKEYSDK_LIBRARIES HockeySDK REQUIRED
+ NO_DEFAULT_PATH PATHS "${ARCH_PREBUILT_DIRS_RELEASE}")
target_link_libraries( ll::bugsplat INTERFACE
${BUGSPLAT_LIBRARIES}
+ ${CRASHREPORTED_LIBRARIES}
+ ${HOCKEYSDK_LIBRARIES}
)
else (WINDOWS)
message(FATAL_ERROR "BugSplat is not supported; add -DUSE_BUGSPLAT=OFF")
diff --git a/indra/llcharacter/llkeyframemotion.cpp b/indra/llcharacter/llkeyframemotion.cpp
index b82734615f5..be1c74a9082 100644
--- a/indra/llcharacter/llkeyframemotion.cpp
+++ b/indra/llcharacter/llkeyframemotion.cpp
@@ -1229,7 +1229,7 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8
bool LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, bool allow_invalid_joints)
{
bool old_version = false;
- std::unique_ptr joint_motion_list(new LLKeyframeMotion::JointMotionList);
+ std::unique_ptr joint_motion_list = std::make_unique();
//-------------------------------------------------------------------------
// get base priority
@@ -1826,7 +1826,7 @@ bool LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
for(S32 i = 0; i < num_constraints; ++i)
{
// read in constraint data
- std::unique_ptr constraintp(new JointConstraintSharedData);
+ std::unique_ptr constraintp = std::make_unique();
U8 byte = 0;
if (!dp.unpackU8(byte, "chain_length"))
diff --git a/indra/llcharacter/llmotion.cpp b/indra/llcharacter/llmotion.cpp
index bc9f5786601..a51857c9a1b 100644
--- a/indra/llcharacter/llmotion.cpp
+++ b/indra/llcharacter/llmotion.cpp
@@ -51,8 +51,8 @@ LLMotion::LLMotion( const LLUUID &id ) :
mSendStopTimestamp(F32_MAX),
mResidualWeight(0.f),
mFadeWeight(1.f),
- mDeactivateCallback(NULL),
- mDeactivateCallbackUserData(NULL)
+ mDeactivateCallback(nullptr),
+ mDeactivateCallbackUserData(nullptr)
{
for (S32 i=0; i<3; ++i)
memset(&mJointSignature[i][0], 0, sizeof(U8) * LL_CHARACTER_MAX_ANIMATED_JOINTS);
diff --git a/indra/llcharacter/llmultigesture.h b/indra/llcharacter/llmultigesture.h
index af0cb086503..199ed5c543c 100644
--- a/indra/llcharacter/llmultigesture.h
+++ b/indra/llcharacter/llmultigesture.h
@@ -54,11 +54,10 @@ class LLMultiGesture
void reset();
const std::string& getTrigger() const { return mTrigger; }
-protected:
- LLMultiGesture(const LLMultiGesture& gest);
- const LLMultiGesture& operator=(const LLMultiGesture& rhs);
-public:
+ LLMultiGesture(const LLMultiGesture& gest) = delete;
+ const LLMultiGesture& operator=(const LLMultiGesture& rhs) = delete;
+
KEY mKey { 0 };
MASK mMask { 0 };
diff --git a/indra/llcharacter/llvisualparam.h b/indra/llcharacter/llvisualparam.h
index 3caddb9c625..8d2c4a3723b 100644
--- a/indra/llcharacter/llvisualparam.h
+++ b/indra/llcharacter/llvisualparam.h
@@ -30,7 +30,8 @@
#include "v3math.h"
#include "llstring.h"
#include "llxmltree.h"
-#include
+
+#include
class LLPolyMesh;
class LLXmlTreeNode;
@@ -104,7 +105,7 @@ LL_ALIGN_PREFIX(16)
class LLVisualParam
{
public:
- typedef boost::function visual_param_mapper;
+ typedef std::function visual_param_mapper;
LLVisualParam();
virtual ~LLVisualParam();
diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt
index 2de9deea701..4d04c2c1190 100644
--- a/indra/llcommon/CMakeLists.txt
+++ b/indra/llcommon/CMakeLists.txt
@@ -101,6 +101,7 @@ set(llcommon_SOURCE_FILES
lluri.cpp
lluriparser.cpp
lluuid.cpp
+ llwatchdog.cpp
llworkerthread.cpp
hbxxh.cpp
u64.cpp
@@ -240,6 +241,7 @@ set(llcommon_HEADER_FILES
lluri.h
lluriparser.h
lluuid.h
+ llwatchdog.h
llwin32headers.h
llworkerthread.h
hbxxh.h
diff --git a/indra/llcommon/llapr.cpp b/indra/llcommon/llapr.cpp
index 01763c49aab..eeff2694a74 100644
--- a/indra/llcommon/llapr.cpp
+++ b/indra/llcommon/llapr.cpp
@@ -154,7 +154,7 @@ LLVolatileAPRPool::LLVolatileAPRPool(bool is_local, apr_pool_t *parent, apr_size
//create mutex
if(!is_local) //not a local apr_pool, that is: shared by multiple threads.
{
- mMutexp.reset(new std::mutex());
+ mMutexp = std::make_unique();
}
}
diff --git a/indra/llcommon/llapr.h b/indra/llcommon/llapr.h
index 693cd7c01fa..11e474b5dda 100644
--- a/indra/llcommon/llapr.h
+++ b/indra/llcommon/llapr.h
@@ -33,7 +33,6 @@
#include // Need PATH_MAX in APR headers...
#endif
-#include
#include "llwin32headers.h"
#include "apr_thread_proc.h"
#include "apr_getopt.h"
@@ -145,7 +144,7 @@ class LL_COMMON_API LLVolatileAPRPool : public LLAPRPool
// 2, a global pool.
//
-class LL_COMMON_API LLAPRFile : boost::noncopyable
+class LL_COMMON_API LLAPRFile
{
// make this non copyable since a copy closes the file
private:
@@ -153,9 +152,12 @@ class LL_COMMON_API LLAPRFile : boost::noncopyable
LLVolatileAPRPool *mCurrentFilePoolp ; //currently in use apr_pool, could be one of them: sAPRFilePoolp, or a temp pool.
public:
- LLAPRFile() ;
+ LLAPRFile();
LLAPRFile(const std::string& filename, apr_int32_t flags, LLVolatileAPRPool* pool = NULL);
- ~LLAPRFile() ;
+ ~LLAPRFile();
+
+ LLAPRFile(const LLAPRFile&) = delete;
+ LLAPRFile& operator=(const LLAPRFile&) = delete;
apr_status_t open(const std::string& filename, apr_int32_t flags, LLVolatileAPRPool* pool = NULL, S32* sizep = NULL);
apr_status_t open(const std::string& filename, apr_int32_t flags, bool use_global_pool); //use gAPRPoolp.
diff --git a/indra/llcommon/llcallbacklist.h b/indra/llcommon/llcallbacklist.h
index d6c415f7c57..036e575117d 100644
--- a/indra/llcommon/llcallbacklist.h
+++ b/indra/llcommon/llcallbacklist.h
@@ -27,8 +27,9 @@
#ifndef LL_LLCALLBACKLIST_H
#define LL_LLCALLBACKLIST_H
-#include "llstl.h"
-#include
+#include "stdtypes.h"
+
+#include
#include
class LLCallbackList
@@ -59,8 +60,8 @@ class LLCallbackList
callback_list_t mCallbackList;
};
-typedef boost::function nullary_func_t;
-typedef boost::function bool_func_t;
+typedef std::function nullary_func_t;
+typedef std::function bool_func_t;
// Call a given callable once in idle loop.
void doOnIdleOneTime(nullary_func_t callable);
diff --git a/indra/llcommon/llcoros.h b/indra/llcommon/llcoros.h
index c3820ae9876..9df52b6ed5a 100644
--- a/indra/llcommon/llcoros.h
+++ b/indra/llcommon/llcoros.h
@@ -37,7 +37,7 @@
#include "mutex.h"
#include "llsingleton.h"
#include "llinstancetracker.h"
-#include
+#include
#include
#include
#include
@@ -112,7 +112,7 @@ class LL_COMMON_API LLCoros: public LLSingleton
/// stuck with the term "coroutine."
typedef boost::fibers::fiber coro;
/// Canonical callable type
- typedef boost::function callable_t;
+ typedef std::function callable_t;
/**
* Create and start running a new coroutine with specified name. The name
diff --git a/indra/llcommon/lldeadmantimer.h b/indra/llcommon/lldeadmantimer.h
index 3f10420d41d..19d65b78b63 100644
--- a/indra/llcommon/lldeadmantimer.h
+++ b/indra/llcommon/lldeadmantimer.h
@@ -99,13 +99,10 @@ class LL_COMMON_API LLDeadmanTimer
/// during updates. If false, cpu usage data isn't
/// collected and will be zero if queried.
LLDeadmanTimer(F64 horizon, bool inc_cpu);
+ ~LLDeadmanTimer() = default;
- ~LLDeadmanTimer()
- {}
-
-private:
- LLDeadmanTimer(const LLDeadmanTimer &); // Not defined
- void operator=(const LLDeadmanTimer &); // Not defined
+ LLDeadmanTimer(const LLDeadmanTimer &) = delete;
+ LLDeadmanTimer& operator=(const LLDeadmanTimer&) = delete;
public:
/// Get the current time. Zero-basis for this time
diff --git a/indra/llcommon/lldependencies.h b/indra/llcommon/lldependencies.h
index 47b6fedc7d7..a1b5c83caf4 100644
--- a/indra/llcommon/lldependencies.h
+++ b/indra/llcommon/lldependencies.h
@@ -30,6 +30,7 @@
#if ! defined(LL_LLDEPENDENCIES_H)
#define LL_LLDEPENDENCIES_H
+#include
#include
#include
#include
@@ -38,7 +39,6 @@
#include
#include
#include
-#include
#include
#include "llexception.h"
@@ -217,7 +217,7 @@ class LLDependencies: public LLDependenciesBase
/// We have various ways to get the dependencies for a given DepNode.
/// Rather than having to restate each one for 'after' and 'before'
/// separately, pass a dep_selector so we can apply each to either.
- typedef boost::function dep_selector;
+ typedef std::function dep_selector;
public:
LLDependencies() {}
@@ -340,7 +340,7 @@ class LLDependencies: public LLDependenciesBase
public:
/// iterator over value_type entries
- typedef boost::transform_iterator,
+ typedef boost::transform_iterator,
typename DepNodeMap::iterator> iterator;
/// range over value_type entries
typedef boost::iterator_range range;
@@ -352,7 +352,7 @@ class LLDependencies: public LLDependenciesBase
}
/// iterator over const_value_type entries
- typedef boost::transform_iterator,
+ typedef boost::transform_iterator,
typename DepNodeMap::const_iterator> const_iterator;
/// range over const_value_type entries
typedef boost::iterator_range const_range;
@@ -364,7 +364,7 @@ class LLDependencies: public LLDependenciesBase
}
/// iterator over stored NODEs
- typedef boost::transform_iterator,
+ typedef boost::transform_iterator,
typename DepNodeMap::iterator> node_iterator;
/// range over stored NODEs
typedef boost::iterator_range node_range;
@@ -380,7 +380,7 @@ class LLDependencies: public LLDependenciesBase
}
/// const iterator over stored NODEs
- typedef boost::transform_iterator,
+ typedef boost::transform_iterator,
typename DepNodeMap::const_iterator> const_node_iterator;
/// const range over stored NODEs
typedef boost::iterator_range const_node_range;
@@ -396,7 +396,7 @@ class LLDependencies: public LLDependenciesBase
}
/// const iterator over stored KEYs
- typedef boost::transform_iterator,
+ typedef boost::transform_iterator,
typename DepNodeMap::const_iterator> const_key_iterator;
/// const range over stored KEYs
typedef boost::iterator_range const_key_range;
diff --git a/indra/llcommon/lldoubledispatch.h b/indra/llcommon/lldoubledispatch.h
index 25039c3e9c1..ad4dc57d589 100644
--- a/indra/llcommon/lldoubledispatch.h
+++ b/indra/llcommon/lldoubledispatch.h
@@ -30,9 +30,7 @@
#define LL_LLDOUBLEDISPATCH_H
#include
-#include
-#include
-#include
+#include
/**
* This class supports function calls which are virtual on the dynamic type of
@@ -156,9 +154,9 @@ class LLDoubleDispatch
insert(t1, t2, func);
if (symmetrical)
{
- // Use boost::bind() to construct a param-swapping thunk. Don't
+ // Use std::bind() to construct a param-swapping thunk. Don't
// forget to reverse the parameters too.
- insert(t2, t1, boost::bind(func, _2, _1));
+ insert(t2, t1, std::bind(func, std::placeholders::_2, std::placeholders::_1));
}
}
@@ -193,7 +191,7 @@ class LLDoubleDispatch
insert(Type(), Type(), func, insertion);
if (symmetrical)
{
- insert(Type(), Type(), boost::bind(func, _2, _1), insertion);
+ insert(Type(), Type(), std::bind(func, std::placeholders::_2, std::placeholders::_1), insertion);
}
}
@@ -271,8 +269,8 @@ class LLDoubleDispatch
typename DispatchTable::iterator find(const ParamBaseType& param1, const ParamBaseType& param2)
{
return std::find_if(mDispatch.begin(), mDispatch.end(),
- boost::bind(&EntryBase::matches, _1,
- boost::ref(param1), boost::ref(param2)));
+ std::bind(&EntryBase::matches, std::placeholders::_1,
+ std::ref(param1), std::ref(param2)));
}
/// Look up the first matching entry.
diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp
index 3411e9c6bb5..b14464382b7 100644
--- a/indra/llcommon/llerror.cpp
+++ b/indra/llcommon/llerror.cpp
@@ -527,8 +527,8 @@ namespace
mFileLevelMap(),
mTagLevelMap(),
mUniqueLogMessages(),
- mCrashFunction(NULL),
- mTimeFunction(NULL),
+ mCrashFunction(nullptr),
+ mTimeFunction(nullptr),
mRecorders(),
mShouldLogCallCounter(0)
{
@@ -1231,7 +1231,7 @@ namespace
std::ostringstream message_stream;
- if (r->wantsTime() && s->mTimeFunction != NULL)
+ if (r->wantsTime() && s->mTimeFunction != nullptr)
{
message_stream << s->mTimeFunction();
}
diff --git a/indra/llcommon/llerrorcontrol.h b/indra/llcommon/llerrorcontrol.h
index 0a7b3d20461..d254fa54074 100644
--- a/indra/llcommon/llerrorcontrol.h
+++ b/indra/llcommon/llerrorcontrol.h
@@ -31,7 +31,7 @@
#include "llerror.h"
#include "llpointer.h"
#include "llrefcount.h"
-#include "boost/function.hpp"
+#include
#include
class LLSD;
@@ -92,7 +92,7 @@ namespace LLError
Control functions.
*/
- typedef boost::function FatalFunction;
+ typedef std::function FatalFunction;
LL_COMMON_API void setFatalFunction(const FatalFunction&);
// The fatal function will be called after an message of LEVEL_ERROR
diff --git a/indra/llcommon/lleventdispatcher.h b/indra/llcommon/lleventdispatcher.h
index 4c3c0f34148..97a60e2829f 100644
--- a/indra/llcommon/lleventdispatcher.h
+++ b/indra/llcommon/lleventdispatcher.h
@@ -33,9 +33,7 @@
#define LL_LLEVENTDISPATCHER_H
#include
-#include
#include
-#include // until C++17, when we get std::is_invocable
#include
#include // std::function
#include // std::unique_ptr
@@ -99,7 +97,7 @@ class LL_COMMON_API LLEventDispatcher
template ::value
+ std::is_invocable::value
>::type>
void add(const std::string& name,
const std::string& desc,
@@ -295,9 +293,8 @@ class LL_COMMON_API LLEventDispatcher
* converted to the corresponding parameter type using LLSDParam.
*/
template ()
- >::type>
+ typename=typename std::enable_if_t<
+ ! std::is_invocable()>>
void add(const std::string& name,
const std::string& desc,
CALLABLE&& f)
@@ -318,7 +315,7 @@ class LL_COMMON_API LLEventDispatcher
*/
template::value &&
+ std::is_member_function_pointer::value &&
! std::is_convertible::value
>::type>
void add(const std::string& name, const std::string& desc, Method f,
@@ -338,7 +335,7 @@ class LL_COMMON_API LLEventDispatcher
template::value &&
- ! boost::hof::is_invocable::value
+ ! std::is_invocable::value
>::type>
void add(const std::string& name, const std::string& desc, Function f,
const LLSD& params, const LLSD& defaults=LLSD());
@@ -364,7 +361,7 @@ class LL_COMMON_API LLEventDispatcher
*/
template::value &&
+ std::is_member_function_pointer::value &&
! std::is_convertible::value
>::type>
void add(const std::string& name, const std::string& desc, Method f,
diff --git a/indra/llcommon/lleventfilter.h b/indra/llcommon/lleventfilter.h
index d8c7e15a275..8b917c23be1 100644
--- a/indra/llcommon/lleventfilter.h
+++ b/indra/llcommon/lleventfilter.h
@@ -33,7 +33,8 @@
#include "stdtypes.h"
#include "lltimer.h"
#include "llsdutil.h"
-#include
+
+#include
class LLEventTimer;
class LLDate;
@@ -92,8 +93,8 @@ class LL_COMMON_API LLEventTimeoutBase: public LLEventFilter
/// construct and connect
LLEventTimeoutBase(LLEventPump& source);
- /// Callable, can be constructed with boost::bind()
- typedef boost::function Action;
+ /// Callable, can be constructed with std::bind()
+ typedef std::function Action;
/**
* Start countdown timer for the specified number of @a seconds. Forward
diff --git a/indra/llcommon/llevents.cpp b/indra/llcommon/llevents.cpp
index 3c6743eac93..9a5324b5987 100644
--- a/indra/llcommon/llevents.cpp
+++ b/indra/llcommon/llevents.cpp
@@ -44,7 +44,6 @@
#include
#include
// external library headers
-#include
#if LL_WINDOWS
#pragma warning (push)
#pragma warning (disable : 4701) // compiler thinks might use uninitialized var, but no
diff --git a/indra/llcommon/llevents.h b/indra/llcommon/llevents.h
index 4bf1fa07a2f..18c05a00814 100644
--- a/indra/llcommon/llevents.h
+++ b/indra/llcommon/llevents.h
@@ -41,11 +41,7 @@
#include
#include
-#include // noncopyable
#include
-#include
-#include // reference_wrapper
-#include
#include
#include "llsd.h"
#include "llsingleton.h"
diff --git a/indra/llcommon/llhandle.h b/indra/llcommon/llhandle.h
index ceea1d9c482..fd7d32e79af 100644
--- a/indra/llcommon/llhandle.h
+++ b/indra/llcommon/llhandle.h
@@ -31,8 +31,6 @@
#include "llrefcount.h"
#include "llexception.h"
#include
-#include
-#include
#include
/**
@@ -90,7 +88,7 @@ class LLHandle
LLHandle() : mTombStone(getDefaultTombStone()) {}
template
- LLHandle(const LLHandle& other, typename boost::enable_if< typename boost::is_convertible >::type* dummy = 0)
+ LLHandle(const LLHandle& other, typename std::enable_if_t>* dummy = 0)
: mTombStone(other.mTombStone)
{}
@@ -199,7 +197,7 @@ class LLHandleProvider
}
template
- LLHandle getDerivedHandle(typename boost::enable_if< typename boost::is_convertible >::type* dummy = 0) const
+ LLHandle getDerivedHandle(typename std::enable_if_t >* dummy = 0) const
{
LLHandle downcast_handle;
downcast_handle.mTombStone = getHandle().mTombStone;
diff --git a/indra/llcommon/llinitdestroyclass.h b/indra/llcommon/llinitdestroyclass.h
index 2354c9f2ed3..7cc9c6b930a 100644
--- a/indra/llcommon/llinitdestroyclass.h
+++ b/indra/llcommon/llinitdestroyclass.h
@@ -37,7 +37,7 @@
#define LL_LLINITDESTROYCLASS_H
#include "llsingleton.h"
-#include
+#include
#include
#include
#include // std::pair
@@ -50,7 +50,7 @@
class LLCallbackRegistry
{
public:
- typedef boost::function func_t;
+ typedef std::function func_t;
void registerCallback(const std::string& name, const func_t& func)
{
diff --git a/indra/llcommon/llinitparam.h b/indra/llcommon/llinitparam.h
index 32d7b17034a..b01ea0bfb1b 100644
--- a/indra/llcommon/llinitparam.h
+++ b/indra/llcommon/llinitparam.h
@@ -28,11 +28,12 @@
#ifndef LL_LLPARAM_H
#define LL_LLPARAM_H
+#include
+#include
#include
#include
+#include
#include
-#include
-#include
#include
#include "llerror.h"
@@ -105,6 +106,26 @@ namespace LLTypeTags
};
}
+namespace ll
+{
+ // Primary template: general case is false
+ template
+ struct is_std_function : std::false_type
+ {
+ };
+
+ // Specialization for std::function
+ // R is the return type, Args is a parameter pack for argument types
+ template
+ struct is_std_function> : std::true_type
+ {
+ };
+
+ // Helper variable template for convenience (C++14 onwards)
+ template
+ constexpr bool is_std_function_v = is_std_function::value;
+}
+
namespace LLInitParam
{
// used to indicate no matching value to a given name when parsing
@@ -114,7 +135,7 @@ namespace LLInitParam
// wraps comparison operator between any 2 values of the same type
// specialize to handle cases where equality isn't defined well, or at all
- template ::value >
+ template || ll::is_std_function_v>
struct ParamCompare
{
static bool equals(const T &a, const T &b)
@@ -123,7 +144,7 @@ namespace LLInitParam
}
};
- // boost function types are not comparable
+ // boost and std function types are not comparable
template
struct ParamCompare
{
@@ -474,7 +495,7 @@ namespace LLInitParam
typedef bool (*parser_read_func_t)(Parser& parser, void* output);
typedef bool (*parser_write_func_t)(Parser& parser, const void*, name_stack_t&);
- typedef boost::function parser_inspect_func_t;
+ typedef std::function parser_inspect_func_t;
typedef std::map parser_read_func_map_t;
typedef std::map parser_write_func_map_t;
@@ -491,7 +512,7 @@ namespace LLInitParam
virtual ~Parser();
- template bool readValue(T& param, typename boost::disable_if >::type* dummy = 0)
+ template bool readValue(T& param, typename std::enable_if_t>* dummy = 0)
{
parser_read_func_map_t::iterator found_it = mParserReadFuncs->find(&typeid(T));
if (found_it != mParserReadFuncs->end())
@@ -502,7 +523,7 @@ namespace LLInitParam
return false;
}
- template bool readValue(T& param, typename boost::enable_if >::type* dummy = 0)
+ template bool readValue(T& param, typename std::enable_if_t >* dummy = 0)
{
parser_read_func_map_t::iterator found_it = mParserReadFuncs->find(&typeid(T));
if (found_it != mParserReadFuncs->end())
diff --git a/indra/llcommon/llleap.cpp b/indra/llcommon/llleap.cpp
index ada6b9519e5..1614cc6e57f 100644
--- a/indra/llcommon/llleap.cpp
+++ b/indra/llcommon/llleap.cpp
@@ -61,7 +61,7 @@ class LLLeapImpl: public LLLeap
// Pass it a callback to our connect() method, so it can send events
// from a particular LLEventPump to the plugin without having to know
// this class or method name.
- mListener(new LLLeapListener(
+ mListener(std::make_unique(
[this](LLEventPump& pump, const std::string& listener)
{ return connect(pump, listener); }))
{
diff --git a/indra/llcommon/llleaplistener.h b/indra/llcommon/llleaplistener.h
index cad4543d02f..f5587d1d68d 100644
--- a/indra/llcommon/llleaplistener.h
+++ b/indra/llcommon/llleaplistener.h
@@ -13,10 +13,9 @@
#define LL_LLLEAPLISTENER_H
#include "lleventapi.h"
+#include
#include