Merge branch 'master' of https://github.com/FirestormViewer/phoenix-firestorm
commit
b527620dfc
|
|
@ -12,13 +12,10 @@ jobs:
|
|||
strategy:
|
||||
matrix:
|
||||
runner: [windows-large, macos-12-xl]
|
||||
configuration: [Release, ReleaseOS]
|
||||
configuration: [Release]
|
||||
include:
|
||||
- runner: macos-12-xl
|
||||
developer_dir: "/Applications/Xcode_14.0.1.app/Contents/Developer"
|
||||
exclude:
|
||||
- runner: macos-12-xl
|
||||
configuration: ReleaseOS
|
||||
runs-on: ${{ matrix.runner }}
|
||||
outputs:
|
||||
viewer_channel: ${{ steps.build.outputs.viewer_channel }}
|
||||
|
|
@ -100,7 +97,7 @@ jobs:
|
|||
|
||||
- name: Determine source branch
|
||||
id: which-branch
|
||||
uses: secondlife/viewer-build-util/which-branch@v1
|
||||
uses: secondlife/viewer-build-util/which-branch@v2
|
||||
with:
|
||||
token: ${{ github.token }}
|
||||
|
||||
|
|
@ -270,7 +267,7 @@ jobs:
|
|||
steps:
|
||||
- name: Sign and package Windows viewer
|
||||
if: env.AZURE_KEY_VAULT_URI && env.AZURE_CERT_NAME && env.AZURE_CLIENT_ID && env.AZURE_CLIENT_SECRET && env.AZURE_TENANT_ID
|
||||
uses: secondlife/viewer-build-util/sign-pkg-windows@v1
|
||||
uses: secondlife/viewer-build-util/sign-pkg-windows@v2
|
||||
with:
|
||||
vault_uri: "${{ env.AZURE_KEY_VAULT_URI }}"
|
||||
cert_name: "${{ env.AZURE_CERT_NAME }}"
|
||||
|
|
@ -309,7 +306,7 @@ jobs:
|
|||
|
||||
- name: Sign and package Mac viewer
|
||||
if: env.SIGNING_CERT_MACOS && env.SIGNING_CERT_MACOS_IDENTITY && env.SIGNING_CERT_MACOS_PASSWORD && steps.note-creds.outputs.note_user && steps.note-creds.outputs.note_pass && steps.note-creds.outputs.note_team
|
||||
uses: secondlife/viewer-build-util/sign-pkg-mac@v1
|
||||
uses: secondlife/viewer-build-util/sign-pkg-mac@v2
|
||||
with:
|
||||
channel: ${{ needs.build.outputs.viewer_channel }}
|
||||
imagename: ${{ needs.build.outputs.imagename }}
|
||||
|
|
@ -329,7 +326,7 @@ jobs:
|
|||
steps:
|
||||
- name: Post Windows symbols
|
||||
if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS
|
||||
uses: secondlife/viewer-build-util/post-bugsplat-windows@v1
|
||||
uses: secondlife/viewer-build-util/post-bugsplat-windows@v2
|
||||
with:
|
||||
username: ${{ env.BUGSPLAT_USER }}
|
||||
password: ${{ env.BUGSPLAT_PASS }}
|
||||
|
|
@ -346,7 +343,7 @@ jobs:
|
|||
steps:
|
||||
- name: Post Mac symbols
|
||||
if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS
|
||||
uses: secondlife/viewer-build-util/post-bugsplat-mac@v1
|
||||
uses: secondlife/viewer-build-util/post-bugsplat-mac@v2
|
||||
with:
|
||||
username: ${{ env.BUGSPLAT_USER }}
|
||||
password: ${{ env.BUGSPLAT_PASS }}
|
||||
|
|
@ -359,31 +356,20 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
if: github.ref_type == 'tag' && startsWith(github.ref_name, 'Second_Life_')
|
||||
steps:
|
||||
- uses: actions/download-artifact@v3
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: Windows-installer
|
||||
pattern: "*-installer"
|
||||
|
||||
- uses: actions/download-artifact@v3
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: macOS-installer
|
||||
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: Windows-metadata
|
||||
|
||||
- name: Rename windows metadata
|
||||
pattern: "*-metadata"
|
||||
|
||||
- name: Rename metadata
|
||||
run: |
|
||||
mv autobuild-package.xml Windows-autobuild-package.xml
|
||||
mv newview/viewer_version.txt Windows-viewer_version.txt
|
||||
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: macOS-metadata
|
||||
|
||||
- name: Rename macOS metadata
|
||||
run: |
|
||||
mv autobuild-package.xml macOS-autobuild-package.xml
|
||||
mv newview/viewer_version.txt macOS-viewer_version.txt
|
||||
cp Windows-metadata/autobuild-package.xml Windows-autobuild-package.xml
|
||||
cp Windows-metadata/newview/viewer_version.txt Windows-viewer_version.txt
|
||||
cp macOS-metadata/autobuild-package.xml macOS-autobuild-package.xml
|
||||
cp macOS-metadata/newview/viewer_version.txt macOS-viewer_version.txt
|
||||
|
||||
# forked from softprops/action-gh-release
|
||||
- name: Create GitHub release
|
||||
|
|
@ -406,8 +392,8 @@ jobs:
|
|||
append_body: true
|
||||
fail_on_unmatched_files: true
|
||||
files: |
|
||||
*.dmg
|
||||
*.exe
|
||||
macOS-installer/*.dmg
|
||||
Windows-installer/*.exe
|
||||
*-autobuild-package.xml
|
||||
*-viewer_version.txt
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ jobs:
|
|||
PERSONAL_ACCESS_TOKEN: ${{ secrets.SHARED_CLA_TOKEN }}
|
||||
with:
|
||||
branch: main
|
||||
path-to-document: https://github.com/secondlife/cla/blob/master/CLA.md
|
||||
path-to-document: https://github.com/secondlife/cla/blob/main/CLA.md
|
||||
path-to-signatures: signatures.json
|
||||
remote-organization-name: secondlife
|
||||
remote-repository-name: cla-signatures
|
||||
|
|
|
|||
|
|
@ -753,7 +753,7 @@
|
|||
<key>copyright</key>
|
||||
<string>Copyright 2014 Apache OpenOffice software</string>
|
||||
<key>version</key>
|
||||
<string>None</string>
|
||||
<string>1.a01bb6c</string>
|
||||
<key>name</key>
|
||||
<string>dictionaries</string>
|
||||
<key>description</key>
|
||||
|
|
@ -1102,11 +1102,11 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>6604c1cca515d287e697997a8d5593d1cae172a9</string>
|
||||
<string>066625e7aa7f697a4b6cd461aad960c57181011f</string>
|
||||
<key>hash_algorithm</key>
|
||||
<string>sha1</string>
|
||||
<key>url</key>
|
||||
<string>https://github.com/secondlife/3p-glh_linear/releases/download/v1.0.1-dev2.g3253ed7-3253ed7/glh_linear-common-None.tar.zst</string>
|
||||
<string>https://github.com/secondlife/3p-glh_linear/releases/download/v1.0.1-dev4-984c397/glh_linear-1.0.1-dev4-common-984c397.tar.zst</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>common</string>
|
||||
|
|
@ -1119,7 +1119,7 @@
|
|||
<key>copyright</key>
|
||||
<string>Copyright (c) 2000 Cass Everitt</string>
|
||||
<key>version</key>
|
||||
<string>None</string>
|
||||
<string>1.0.1-dev4</string>
|
||||
<key>name</key>
|
||||
<string>glh_linear</string>
|
||||
<key>description</key>
|
||||
|
|
@ -1194,11 +1194,11 @@
|
|||
<key>creds</key>
|
||||
<string>github</string>
|
||||
<key>hash</key>
|
||||
<string>a193ff65d6db48626d65d96c6124c6efca85e8ec</string>
|
||||
<string>ae2c2a215b1bc2e3f37a67e301926dc405902d1a</string>
|
||||
<key>hash_algorithm</key>
|
||||
<string>sha1</string>
|
||||
<key>url</key>
|
||||
<string>https://api.github.com/repos/secondlife/3p-havok-source/releases/assets/108912596</string>
|
||||
<string>https://api.github.com/repos/secondlife/3p-havok-source/releases/assets/136778143</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>darwin64</string>
|
||||
|
|
@ -1222,11 +1222,11 @@
|
|||
<key>creds</key>
|
||||
<string>github</string>
|
||||
<key>hash</key>
|
||||
<string>ebfb82b6143874e7938b9d1e8a70d0a2e28aa818</string>
|
||||
<string>0393dd75c58f7046bed47e62a8884a78cb02a5c3</string>
|
||||
<key>hash_algorithm</key>
|
||||
<string>sha1</string>
|
||||
<key>url</key>
|
||||
<string>https://api.github.com/repos/secondlife/3p-havok-source/releases/assets/108912599</string>
|
||||
<string>https://api.github.com/repos/secondlife/3p-havok-source/releases/assets/136778145</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>windows64</string>
|
||||
|
|
@ -1765,6 +1765,15 @@
|
|||
</map>
|
||||
<key>llca</key>
|
||||
<map>
|
||||
<key>copyright</key>
|
||||
<string>Copyright (c) 2016, Linden Research, Inc.; data provided by the Mozilla NSS Project.
|
||||
</string>
|
||||
<key>license</key>
|
||||
<string>mit</string>
|
||||
<key>license_file</key>
|
||||
<string>LICENSES/ca-license.txt</string>
|
||||
<key>name</key>
|
||||
<string>llca</string>
|
||||
<key>platforms</key>
|
||||
<map>
|
||||
<key>common</key>
|
||||
|
|
@ -1772,27 +1781,18 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>3a3e14563cd5fc019c3f139b82aa46ec79847709</string>
|
||||
<string>a9503e1b4e1d9790cf29d18a3d9ab39e6a515679</string>
|
||||
<key>hash_algorithm</key>
|
||||
<string>sha1</string>
|
||||
<key>url</key>
|
||||
<string>https://github.com/secondlife/llca/releases/download/v202312051403.17-0f5d9c3/llca-202312051404.0-common-0f5d9c3.tar.zst</string>
|
||||
<string>https://github.com/secondlife/llca/releases/download/v202402012004.0-0f5d9c3/llca-202402012004.0-common-0f5d9c3.tar.zst</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>common</string>
|
||||
</map>
|
||||
</map>
|
||||
<key>license</key>
|
||||
<string>mit</string>
|
||||
<key>license_file</key>
|
||||
<string>LICENSES/ca-license.txt</string>
|
||||
<key>copyright</key>
|
||||
<string>Copyright (c) 2016, Linden Research, Inc.; data provided by the Mozilla NSS Project.
|
||||
</string>
|
||||
<key>version</key>
|
||||
<string>202312051404.0</string>
|
||||
<key>name</key>
|
||||
<string>llca</string>
|
||||
<string>202402012004.0</string>
|
||||
</map>
|
||||
<key>llphysicsextensions_source</key>
|
||||
<map>
|
||||
|
|
|
|||
10
build.sh
10
build.sh
|
|
@ -82,7 +82,7 @@ installer_Linux()
|
|||
{
|
||||
local package_name="$1"
|
||||
local package_dir="$(build_dir_Linux)/newview/"
|
||||
local pattern=".*$(viewer_channel_suffix ${package_name})_[0-9]+_[0-9]+_[0-9]+_[0-9]+_i686\\.tar\\.bz2\$"
|
||||
local pattern=".*$(viewer_channel_suffix ${package_name})_[0-9]+_[0-9]+_[0-9]+_[0-9]+_i686\\.tar\\.xz\$"
|
||||
# since the additional packages are built after the base package,
|
||||
# sorting oldest first ensures that the unqualified package is returned
|
||||
# even if someone makes a qualified name that duplicates the last word of the base name
|
||||
|
|
@ -170,7 +170,7 @@ pre_build()
|
|||
# This name is consumed by indra/newview/CMakeLists.txt. Make it
|
||||
# absolute because we've had troubles with relative pathnames.
|
||||
abs_build_dir="$(cd "$build_dir"; pwd)"
|
||||
VIEWER_SYMBOL_FILE="$(native_path "$abs_build_dir/newview/$variant/secondlife-symbols-$symplat-${AUTOBUILD_ADDRSIZE}.tar.bz2")"
|
||||
VIEWER_SYMBOL_FILE="$(native_path "$abs_build_dir/newview/$variant/secondlife-symbols-$symplat-${AUTOBUILD_ADDRSIZE}.tar.xz")"
|
||||
fi
|
||||
|
||||
# honor autobuild_configure_parameters same as sling-buildscripts
|
||||
|
|
@ -414,10 +414,10 @@ do
|
|||
fi
|
||||
if [ -d "$build_dir/doxygen/html" ]
|
||||
then
|
||||
tar -c -f "$build_dir/viewer-doxygen.tar.bz2" --strip-components 3 "$build_dir/doxygen/html"
|
||||
python_cmd "$helpers/codeticket.py" addoutput "Doxygen Tarball" "$build_dir/viewer-doxygen.tar.bz2" \
|
||||
tar -cJf "$build_dir/viewer-doxygen.tar.xz" --strip-components 3 "$build_dir/doxygen/html"
|
||||
python_cmd "$helpers/codeticket.py" addoutput "Doxygen Tarball" "$build_dir/viewer-doxygen.tar.xz" \
|
||||
|| fatal "Upload of doxygen tarball failed"
|
||||
metadata+=("$build_dir/viewer-doxygen.tar.bz2")
|
||||
metadata+=("$build_dir/viewer-doxygen.tar.xz")
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
|
|
|
|||
|
|
@ -64,6 +64,8 @@ Aimee Trescothick
|
|||
VWR-14711
|
||||
VWR-14712
|
||||
VWR-15454
|
||||
AiraYumi
|
||||
SL-20781 (github PR #613)
|
||||
Alejandro Rosenthal
|
||||
VWR-1184
|
||||
Aleric Inglewood
|
||||
|
|
@ -855,6 +857,7 @@ Kadah Coba
|
|||
Jondan Lundquist
|
||||
Joosten Briebers
|
||||
MAINT-7074
|
||||
BUG-225288
|
||||
Josef Munster
|
||||
Josette Windlow
|
||||
Juilan Tripsa
|
||||
|
|
|
|||
|
|
@ -24,12 +24,6 @@
|
|||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#if LL_MSVC
|
||||
// disable warning about boost::lexical_cast returning uninitialized data
|
||||
// when it fails to parse the string
|
||||
#pragma warning (disable:4701)
|
||||
#endif
|
||||
|
||||
#include "linden_common.h"
|
||||
|
||||
#include "llavatarappearance.h"
|
||||
|
|
@ -46,14 +40,6 @@
|
|||
#include "boost/bind.hpp"
|
||||
#include "boost/tokenizer.hpp"
|
||||
|
||||
|
||||
#if LL_MSVC
|
||||
// disable boost::lexical_cast warning
|
||||
#pragma warning (disable:4702)
|
||||
#endif
|
||||
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
using namespace LLAvatarAppearanceDefines;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -230,7 +216,7 @@ void LLAvatarAppearance::initInstance()
|
|||
for (U32 lod = 0; lod < mesh_dict->mLOD; lod++)
|
||||
{
|
||||
LLAvatarJointMesh* mesh = createAvatarJointMesh();
|
||||
std::string mesh_name = "m" + mesh_dict->mName + boost::lexical_cast<std::string>(lod);
|
||||
std::string mesh_name = "m" + mesh_dict->mName + std::to_string(lod);
|
||||
// We pre-pended an m - need to capitalize first character for camelCase
|
||||
mesh_name[1] = toupper(mesh_name[1]);
|
||||
mesh->setName(mesh_name);
|
||||
|
|
|
|||
|
|
@ -255,7 +255,7 @@ private:
|
|||
};
|
||||
|
||||
/// shared_ptr manages Entry lifespan for us
|
||||
typedef boost::shared_ptr<EntryBase> EntryPtr;
|
||||
typedef std::shared_ptr<EntryBase> EntryPtr;
|
||||
/// use a @c list to make it easy to insert
|
||||
typedef std::list<EntryPtr> DispatchTable;
|
||||
DispatchTable mDispatch;
|
||||
|
|
|
|||
|
|
@ -1081,7 +1081,7 @@ namespace LLError
|
|||
//
|
||||
// NOTE!!! Requires external mutex lock!!!
|
||||
template <typename RECORDER>
|
||||
std::pair<boost::shared_ptr<RECORDER>, Recorders::iterator>
|
||||
std::pair<std::shared_ptr<RECORDER>, Recorders::iterator>
|
||||
findRecorderPos(SettingsConfigPtr &s)
|
||||
{
|
||||
// Since we promise to return an iterator, use a classic iterator
|
||||
|
|
@ -1092,7 +1092,7 @@ namespace LLError
|
|||
// *it is a RecorderPtr, a shared_ptr<Recorder>. Use a
|
||||
// dynamic_pointer_cast to try to downcast to test if it's also a
|
||||
// shared_ptr<RECORDER>.
|
||||
auto ptr = boost::dynamic_pointer_cast<RECORDER>(*it);
|
||||
auto ptr = std::dynamic_pointer_cast<RECORDER>(*it);
|
||||
if (ptr)
|
||||
{
|
||||
// found the entry we want
|
||||
|
|
@ -1112,7 +1112,7 @@ namespace LLError
|
|||
// shared_ptr might be empty (operator!() returns true) if there was no
|
||||
// such RECORDER subclass instance in mRecorders.
|
||||
template <typename RECORDER>
|
||||
boost::shared_ptr<RECORDER> findRecorder()
|
||||
std::shared_ptr<RECORDER> findRecorder()
|
||||
{
|
||||
SettingsConfigPtr s = Globals::getInstance()->getSettingsConfig();
|
||||
LLMutexLock lock(&s->mRecorderMutex);
|
||||
|
|
@ -1145,7 +1145,7 @@ namespace LLError
|
|||
|
||||
if (!file_name.empty())
|
||||
{
|
||||
boost::shared_ptr<RecordToFile> recordToFile(new RecordToFile(file_name));
|
||||
std::shared_ptr<RecordToFile> recordToFile(new RecordToFile(file_name));
|
||||
if (recordToFile->okay())
|
||||
{
|
||||
addRecorder(recordToFile);
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ namespace LLError
|
|||
bool mWantsMultiline;
|
||||
};
|
||||
|
||||
typedef boost::shared_ptr<Recorder> RecorderPtr;
|
||||
typedef std::shared_ptr<Recorder> RecorderPtr;
|
||||
|
||||
/**
|
||||
* Instantiate GenericRecorder with a callable(level, message) to get
|
||||
|
|
|
|||
|
|
@ -211,12 +211,21 @@ void LLEventPumps::clear()
|
|||
}
|
||||
}
|
||||
|
||||
void LLEventPumps::reset()
|
||||
void LLEventPumps::reset(bool log_pumps)
|
||||
{
|
||||
// Reset every known LLEventPump instance. Leave it up to each instance to
|
||||
// decide what to do with the reset() call.
|
||||
if (log_pumps)
|
||||
{
|
||||
LL_INFOS() << "Resetting " << (S32)mPumpMap.size() << " pumps" << LL_ENDL;
|
||||
}
|
||||
|
||||
for (PumpMap::value_type& pair : mPumpMap)
|
||||
{
|
||||
if (log_pumps)
|
||||
{
|
||||
LL_INFOS() << "Resetting pump " << pair.first << LL_ENDL;
|
||||
}
|
||||
pair.second->reset();
|
||||
}
|
||||
}
|
||||
|
|
@ -373,9 +382,11 @@ std::string LLEventPump::inventName(const std::string& pfx)
|
|||
|
||||
void LLEventPump::clear()
|
||||
{
|
||||
LLMutexLock lock(&mConnectionListMutex);
|
||||
// Destroy the original LLStandardSignal instance, replacing it with a
|
||||
// whole new one.
|
||||
mSignal = std::make_shared<LLStandardSignal>();
|
||||
|
||||
mConnections.clear();
|
||||
}
|
||||
|
||||
|
|
@ -383,6 +394,7 @@ void LLEventPump::reset()
|
|||
{
|
||||
// Resetting mSignal is supposed to disconnect everything on its own
|
||||
// But due to crash on 'reset' added explicit cleanup to get more data
|
||||
LLMutexLock lock(&mConnectionListMutex);
|
||||
ConnectionMap::const_iterator iter = mConnections.begin();
|
||||
ConnectionMap::const_iterator end = mConnections.end();
|
||||
while (iter!=end)
|
||||
|
|
@ -407,6 +419,8 @@ LLBoundListener LLEventPump::listen_impl(const std::string& name, const LLEventL
|
|||
return LLBoundListener();
|
||||
}
|
||||
|
||||
LLMutexLock lock(&mConnectionListMutex);
|
||||
|
||||
float nodePosition = 1.0;
|
||||
|
||||
// if the supplied name is empty we are not interested in the ordering mechanism
|
||||
|
|
@ -566,8 +580,9 @@ LLBoundListener LLEventPump::listen_impl(const std::string& name, const LLEventL
|
|||
return bound;
|
||||
}
|
||||
|
||||
LLBoundListener LLEventPump::getListener(const std::string& name) const
|
||||
LLBoundListener LLEventPump::getListener(const std::string& name)
|
||||
{
|
||||
LLMutexLock lock(&mConnectionListMutex);
|
||||
ConnectionMap::const_iterator found = mConnections.find(name);
|
||||
if (found != mConnections.end())
|
||||
{
|
||||
|
|
@ -579,6 +594,7 @@ LLBoundListener LLEventPump::getListener(const std::string& name) const
|
|||
|
||||
void LLEventPump::stopListening(const std::string& name)
|
||||
{
|
||||
LLMutexLock lock(&mConnectionListMutex);
|
||||
ConnectionMap::iterator found = mConnections.find(name);
|
||||
if (found != mConnections.end())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -334,7 +334,7 @@ public:
|
|||
* Reset all known LLEventPump instances
|
||||
* workaround for DEV-35406 crash on shutdown
|
||||
*/
|
||||
void reset();
|
||||
void reset(bool log_pumps = false);
|
||||
|
||||
private:
|
||||
friend class LLEventPump;
|
||||
|
|
@ -560,7 +560,7 @@ public:
|
|||
|
||||
/// Get the LLBoundListener associated with the passed name (dummy
|
||||
/// LLBoundListener if not found)
|
||||
virtual LLBoundListener getListener(const std::string& name) const;
|
||||
virtual LLBoundListener getListener(const std::string& name);
|
||||
/**
|
||||
* Instantiate one of these to block an existing connection:
|
||||
* @code
|
||||
|
|
@ -603,6 +603,7 @@ private:
|
|||
LLHandle<LLEventPumps> mRegistry;
|
||||
|
||||
std::string mName;
|
||||
LLMutex mConnectionListMutex;
|
||||
|
||||
protected:
|
||||
virtual LLBoundListener listen_impl(const std::string& name, const LLEventListener&,
|
||||
|
|
|
|||
|
|
@ -627,7 +627,7 @@ namespace LLInitParam
|
|||
UserData* mUserData;
|
||||
};
|
||||
|
||||
typedef boost::shared_ptr<ParamDescriptor> ParamDescriptorPtr;
|
||||
typedef std::shared_ptr<ParamDescriptor> ParamDescriptorPtr;
|
||||
|
||||
// each derived Block class keeps a static data structure maintaining offsets to various params
|
||||
class LL_COMMON_API BlockDescriptor
|
||||
|
|
|
|||
|
|
@ -462,10 +462,10 @@ private:
|
|||
LLProcessPtr mChild;
|
||||
LLTempBoundListener
|
||||
mStdinConnection, mStdoutConnection, mStdoutDataConnection, mStderrConnection;
|
||||
boost::scoped_ptr<LLEventPump::Blocker> mBlocker;
|
||||
std::unique_ptr<LLEventPump::Blocker> mBlocker;
|
||||
LLProcess::ReadPipe::size_type mExpect;
|
||||
LLError::RecorderPtr mRecorder;
|
||||
boost::scoped_ptr<LLLeapListener> mListener;
|
||||
std::unique_ptr<LLLeapListener> mListener;
|
||||
};
|
||||
|
||||
// These must follow the declaration of LLLeapImpl, so they may as well be last.
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@
|
|||
#include <mach/mach_host.h>
|
||||
#elif LL_LINUX
|
||||
# include <unistd.h>
|
||||
# include <sys/resource.h>
|
||||
#endif
|
||||
|
||||
#include "llmemory.h"
|
||||
|
|
@ -270,72 +271,21 @@ U64 LLMemory::getCurrentRSS()
|
|||
}
|
||||
|
||||
#elif defined(LL_LINUX)
|
||||
// <FS:Beq> Linux RSS appears to have drifted from the implementation below.
|
||||
// U64 LLMemory::getCurrentRSS()
|
||||
// {
|
||||
// static const char statPath[] = "/proc/self/stat";
|
||||
// LLFILE *fp = LLFile::fopen(statPath, "r");
|
||||
// U64 rss = 0;
|
||||
|
||||
// if (fp == NULL)
|
||||
// {
|
||||
// LL_WARNS() << "couldn't open " << statPath << LL_ENDL;
|
||||
// return 0;
|
||||
// }
|
||||
U64 LLMemory::getCurrentRSS()
|
||||
{
|
||||
struct rusage usage;
|
||||
|
||||
// // Eee-yew! See Documentation/filesystems/proc.txt in your
|
||||
// // nearest friendly kernel tree for details.
|
||||
|
||||
// {
|
||||
// int ret = fscanf(fp, "%*d (%*[^)]) %*c %*d %*d %*d %*d %*d %*d %*d "
|
||||
// "%*d %*d %*d %*d %*d %*d %*d %*d %*d %*d %*d %Lu",
|
||||
// &rss);
|
||||
// if (ret != 1)
|
||||
// {
|
||||
// LL_WARNS() << "couldn't parse contents of " << statPath << LL_ENDL;
|
||||
// rss = 0;
|
||||
// }
|
||||
// }
|
||||
|
||||
// fclose(fp);
|
||||
if (getrusage(RUSAGE_SELF, &usage) != 0) {
|
||||
// Error handling code could be here
|
||||
return 0;
|
||||
}
|
||||
|
||||
// return rss;
|
||||
// }
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <filesystem>
|
||||
#include <unistd.h>
|
||||
|
||||
// return the RSS in bytes. This value is converted to kilobytes implicitly elsewhere.
|
||||
U64 LLMemory::getCurrentRSS() {
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
// Get the page size (static variable)
|
||||
static const long pageSize = sysconf(_SC_PAGESIZE);
|
||||
|
||||
// Open the /proc/self/statm file
|
||||
static const auto statmPath = fs::path("/proc/self/statm");
|
||||
std::ifstream statmFile(statmPath);
|
||||
if (!statmFile.is_open()) {
|
||||
return 0; // Return 0 if the file cannot be opened
|
||||
}
|
||||
|
||||
// Read the entire line from statm file
|
||||
std::string line;
|
||||
std::getline(statmFile, line);
|
||||
statmFile.close();
|
||||
|
||||
// Extract the values from the line
|
||||
std::istringstream iss(line);
|
||||
long size, rss, shared, text, lib, data, dt;
|
||||
iss >> size >> rss >> shared >> text >> lib >> data >> dt;
|
||||
|
||||
// Convert pages to bytes and return RSS
|
||||
return static_cast<U64>( rss * pageSize );
|
||||
// ru_maxrss (since Linux 2.6.32)
|
||||
// This is the maximum resident set size used (in kilobytes).
|
||||
return usage.ru_maxrss * 1024;
|
||||
}
|
||||
// </FS:Beq>
|
||||
|
||||
#else
|
||||
|
||||
U64 LLMemory::getCurrentRSS()
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@
|
|||
#include "llevents.h"
|
||||
#include "llexception.h"
|
||||
|
||||
#include <boost/foreach.hpp>
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/asio/streambuf.hpp>
|
||||
#include <boost/asio/buffers_iterator.hpp>
|
||||
|
|
@ -587,7 +586,7 @@ LLProcess::LLProcess(const LLSDOrParams& params):
|
|||
// apr_procattr_child_err_set()), or accepting a filename, opening it and
|
||||
// passing that apr_file_t (simple <, >, 2> redirect emulation).
|
||||
std::vector<apr_int32_t> select;
|
||||
BOOST_FOREACH(const FileParam& fparam, params.files)
|
||||
for (const FileParam& fparam : params.files)
|
||||
{
|
||||
// Every iteration, we're going to append an item to 'select'. At the
|
||||
// top of the loop, its size() is, in effect, an index. Use that to
|
||||
|
|
@ -684,7 +683,7 @@ LLProcess::LLProcess(const LLSDOrParams& params):
|
|||
argv.push_back(params.executable().c_str());
|
||||
|
||||
// Add arguments. See above remarks about c_str().
|
||||
BOOST_FOREACH(const std::string& arg, params.args)
|
||||
for (const std::string& arg : params.args)
|
||||
{
|
||||
argv.push_back(arg.c_str());
|
||||
}
|
||||
|
|
@ -961,7 +960,7 @@ void LLProcess::handle_status(int reason, int status)
|
|||
// only be performed if in fact we're going to produce the log message.
|
||||
LL_DEBUGS("LLProcess") << empty;
|
||||
std::string reason_str;
|
||||
BOOST_FOREACH(const ReasonCode& rcp, reasons)
|
||||
for (const ReasonCode& rcp : reasons)
|
||||
{
|
||||
if (reason == rcp.code)
|
||||
{
|
||||
|
|
@ -1151,7 +1150,7 @@ std::ostream& operator<<(std::ostream& out, const LLProcess::Params& params)
|
|||
out << "cd " << LLStringUtil::quote(params.cwd) << ": ";
|
||||
}
|
||||
out << LLStringUtil::quote(params.executable);
|
||||
BOOST_FOREACH(const std::string& arg, params.args)
|
||||
for (const std::string& arg : params.args)
|
||||
{
|
||||
out << ' ' << LLStringUtil::quote(arg);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ class LLEventPump;
|
|||
class LLProcess;
|
||||
/// LLProcess instances are created on the heap by static factory methods and
|
||||
/// managed by ref-counted pointers.
|
||||
typedef boost::shared_ptr<LLProcess> LLProcessPtr;
|
||||
typedef std::shared_ptr<LLProcess> LLProcessPtr;
|
||||
|
||||
/**
|
||||
* LLProcess handles launching an external process with specified command line
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ public:
|
|||
/**
|
||||
* @brief The pointer to a runnable.
|
||||
*/
|
||||
typedef boost::shared_ptr<LLRunnable> run_ptr_t;
|
||||
typedef std::shared_ptr<LLRunnable> run_ptr_t;
|
||||
|
||||
/**
|
||||
* @brief The handle for use in the API.
|
||||
|
|
|
|||
|
|
@ -478,9 +478,9 @@ namespace llsd
|
|||
{
|
||||
|
||||
/*****************************************************************************
|
||||
* BOOST_FOREACH() helpers for LLSD
|
||||
* range-based for-loop helpers for LLSD
|
||||
*****************************************************************************/
|
||||
/// Usage: BOOST_FOREACH(LLSD item, inArray(someLLSDarray)) { ... }
|
||||
/// Usage: for (LLSD item : inArray(someLLSDarray)) { ... }
|
||||
class inArray
|
||||
{
|
||||
public:
|
||||
|
|
@ -503,7 +503,7 @@ private:
|
|||
/// MapEntry is what you get from dereferencing an LLSD::map_[const_]iterator.
|
||||
typedef std::map<LLSD::String, LLSD>::value_type MapEntry;
|
||||
|
||||
/// Usage: BOOST_FOREACH([const] MapEntry& e, inMap(someLLSDmap)) { ... }
|
||||
/// Usage: for([const] MapEntry& e : inMap(someLLSDmap)) { ... }
|
||||
class inMap
|
||||
{
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@
|
|||
#include "lldependencies.h"
|
||||
#include "llexception.h"
|
||||
#include "llcoros.h"
|
||||
#include <boost/foreach.hpp>
|
||||
#include <algorithm>
|
||||
#include <iostream> // std::cerr in dire emergency
|
||||
#include <sstream>
|
||||
|
|
@ -411,7 +410,7 @@ void LLSingletonBase::cleanup_()
|
|||
void LLSingletonBase::deleteAll()
|
||||
{
|
||||
// It's essential to traverse these in dependency order.
|
||||
BOOST_FOREACH(LLSingletonBase* sp, dep_sort())
|
||||
for (LLSingletonBase* sp : dep_sort())
|
||||
{
|
||||
// Capture the class name first: in case of exception, don't count on
|
||||
// being able to extract it later.
|
||||
|
|
|
|||
|
|
@ -1229,7 +1229,7 @@ void LLStringUtilBase<T>::getTokens(const string_type& string, std::vector<strin
|
|||
{
|
||||
// This overload must deal with escapes. Delegate that to InEscString
|
||||
// (unless there ARE no escapes).
|
||||
boost::scoped_ptr< LLStringUtilBaseImpl::InString<T> > instrp;
|
||||
std::unique_ptr< LLStringUtilBaseImpl::InString<T> > instrp;
|
||||
if (escapes.empty())
|
||||
instrp.reset(new LLStringUtilBaseImpl::InString<T>(string.begin(), string.end()));
|
||||
else
|
||||
|
|
|
|||
|
|
@ -49,7 +49,6 @@
|
|||
#include "llsdutil.h"
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/circular_buffer.hpp>
|
||||
#include <boost/foreach.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <boost/range.hpp>
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
|
|
@ -917,9 +916,9 @@ void LLMemoryInfo::stream(std::ostream& s) const
|
|||
|
||||
// Max key length
|
||||
size_t key_width(0);
|
||||
BOOST_FOREACH(const MapEntry& pair, inMap(mStatsMap))
|
||||
for (const auto& [key, value] : inMap(mStatsMap))
|
||||
{
|
||||
size_t len(pair.first.length());
|
||||
size_t len(key.length());
|
||||
if (len > key_width)
|
||||
{
|
||||
key_width = len;
|
||||
|
|
@ -927,10 +926,9 @@ void LLMemoryInfo::stream(std::ostream& s) const
|
|||
}
|
||||
|
||||
// Now stream stats
|
||||
BOOST_FOREACH(const MapEntry& pair, inMap(mStatsMap))
|
||||
for (const auto& [key, value] : inMap(mStatsMap))
|
||||
{
|
||||
s << pfx << std::setw(narrow<size_t>(key_width+1)) << (pair.first + ':') << ' ';
|
||||
LLSD value(pair.second);
|
||||
s << pfx << std::setw(narrow<size_t>(key_width+1)) << (key + ':') << ' ';
|
||||
if (value.isInteger())
|
||||
s << std::setw(12) << value.asInteger();
|
||||
else if (value.isReal())
|
||||
|
|
|
|||
|
|
@ -156,27 +156,27 @@ namespace tut
|
|||
|
||||
int countMessages()
|
||||
{
|
||||
return boost::dynamic_pointer_cast<TestRecorder>(mRecorder)->countMessages();
|
||||
return std::dynamic_pointer_cast<TestRecorder>(mRecorder)->countMessages();
|
||||
}
|
||||
|
||||
void clearMessages()
|
||||
{
|
||||
boost::dynamic_pointer_cast<TestRecorder>(mRecorder)->clearMessages();
|
||||
std::dynamic_pointer_cast<TestRecorder>(mRecorder)->clearMessages();
|
||||
}
|
||||
|
||||
void setWantsTime(bool t)
|
||||
{
|
||||
boost::dynamic_pointer_cast<TestRecorder>(mRecorder)->showTime(t);
|
||||
std::dynamic_pointer_cast<TestRecorder>(mRecorder)->showTime(t);
|
||||
}
|
||||
|
||||
void setWantsMultiline(bool t)
|
||||
{
|
||||
boost::dynamic_pointer_cast<TestRecorder>(mRecorder)->showMultiline(t);
|
||||
std::dynamic_pointer_cast<TestRecorder>(mRecorder)->showMultiline(t);
|
||||
}
|
||||
|
||||
std::string message(int n)
|
||||
{
|
||||
return boost::dynamic_pointer_cast<TestRecorder>(mRecorder)->message(n);
|
||||
return std::dynamic_pointer_cast<TestRecorder>(mRecorder)->message(n);
|
||||
}
|
||||
|
||||
void ensure_message_count(int expectedCount)
|
||||
|
|
@ -500,12 +500,12 @@ namespace
|
|||
void testLogName(LLError::RecorderPtr recorder, LogFromFunction f,
|
||||
const std::string& class_name = "")
|
||||
{
|
||||
boost::dynamic_pointer_cast<tut::TestRecorder>(recorder)->clearMessages();
|
||||
std::dynamic_pointer_cast<tut::TestRecorder>(recorder)->clearMessages();
|
||||
std::string name = f(false);
|
||||
f(true);
|
||||
|
||||
std::string messageWithoutName = boost::dynamic_pointer_cast<tut::TestRecorder>(recorder)->message(0);
|
||||
std::string messageWithName = boost::dynamic_pointer_cast<tut::TestRecorder>(recorder)->message(1);
|
||||
std::string messageWithoutName = std::dynamic_pointer_cast<tut::TestRecorder>(recorder)->message(0);
|
||||
std::string messageWithName = std::dynamic_pointer_cast<tut::TestRecorder>(recorder)->message(1);
|
||||
|
||||
ensure_has(name + " logged without name",
|
||||
messageWithoutName, name);
|
||||
|
|
@ -694,13 +694,13 @@ namespace tut
|
|||
LL_INFOS() << "boo" << LL_ENDL;
|
||||
|
||||
ensure_message_field_equals(0, MSG_FIELD, "boo");
|
||||
ensure_equals("alt recorder count", boost::dynamic_pointer_cast<TestRecorder>(altRecorder)->countMessages(), 1);
|
||||
ensure_contains("alt recorder message 0", boost::dynamic_pointer_cast<TestRecorder>(altRecorder)->message(0), "boo");
|
||||
ensure_equals("alt recorder count", std::dynamic_pointer_cast<TestRecorder>(altRecorder)->countMessages(), 1);
|
||||
ensure_contains("alt recorder message 0", std::dynamic_pointer_cast<TestRecorder>(altRecorder)->message(0), "boo");
|
||||
|
||||
LLError::setTimeFunction(roswell);
|
||||
|
||||
LLError::RecorderPtr anotherRecorder(new TestRecorder());
|
||||
boost::dynamic_pointer_cast<TestRecorder>(anotherRecorder)->showTime(true);
|
||||
std::dynamic_pointer_cast<TestRecorder>(anotherRecorder)->showTime(true);
|
||||
LLError::addRecorder(anotherRecorder);
|
||||
|
||||
LL_INFOS() << "baz" << LL_ENDL;
|
||||
|
|
@ -708,10 +708,10 @@ namespace tut
|
|||
std::string when = roswell();
|
||||
|
||||
ensure_message_does_not_contain(1, when);
|
||||
ensure_equals("alt recorder count", boost::dynamic_pointer_cast<TestRecorder>(altRecorder)->countMessages(), 2);
|
||||
ensure_does_not_contain("alt recorder message 1", boost::dynamic_pointer_cast<TestRecorder>(altRecorder)->message(1), when);
|
||||
ensure_equals("another recorder count", boost::dynamic_pointer_cast<TestRecorder>(anotherRecorder)->countMessages(), 1);
|
||||
ensure_contains("another recorder message 0", boost::dynamic_pointer_cast<TestRecorder>(anotherRecorder)->message(0), when);
|
||||
ensure_equals("alt recorder count", std::dynamic_pointer_cast<TestRecorder>(altRecorder)->countMessages(), 2);
|
||||
ensure_does_not_contain("alt recorder message 1", std::dynamic_pointer_cast<TestRecorder>(altRecorder)->message(1), when);
|
||||
ensure_equals("another recorder count", std::dynamic_pointer_cast<TestRecorder>(anotherRecorder)->countMessages(), 1);
|
||||
ensure_contains("another recorder message 0", std::dynamic_pointer_cast<TestRecorder>(anotherRecorder)->message(0), when);
|
||||
|
||||
LLError::removeRecorder(altRecorder);
|
||||
LLError::removeRecorder(anotherRecorder);
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ namespace tut
|
|||
int which;
|
||||
LLTestApp testApp;
|
||||
|
||||
void explicit_wait(boost::shared_ptr<LLCoros::Promise<std::string>>& cbp);
|
||||
void explicit_wait(std::shared_ptr<LLCoros::Promise<std::string>>& cbp);
|
||||
void waitForEventOn1();
|
||||
void coroPump();
|
||||
void postAndWait1();
|
||||
|
|
@ -111,7 +111,7 @@ namespace tut
|
|||
typedef coroutine_group::object object;
|
||||
coroutine_group coroutinegrp("coroutine");
|
||||
|
||||
void test_data::explicit_wait(boost::shared_ptr<LLCoros::Promise<std::string>>& cbp)
|
||||
void test_data::explicit_wait(std::shared_ptr<LLCoros::Promise<std::string>>& cbp)
|
||||
{
|
||||
BEGIN
|
||||
{
|
||||
|
|
@ -127,7 +127,7 @@ namespace tut
|
|||
// For test purposes, instead of handing 'callback' (or an
|
||||
// adapter) off to some I/O subsystem, we'll just pass it back to
|
||||
// our caller.
|
||||
cbp = boost::make_shared<LLCoros::Promise<std::string>>();
|
||||
cbp = std::make_shared<LLCoros::Promise<std::string>>();
|
||||
LLCoros::Future<std::string> future = LLCoros::getFuture(*cbp);
|
||||
|
||||
// calling get() on the future causes us to suspend
|
||||
|
|
@ -146,7 +146,7 @@ namespace tut
|
|||
DEBUG;
|
||||
|
||||
// Construct the coroutine instance that will run explicit_wait.
|
||||
boost::shared_ptr<LLCoros::Promise<std::string>> respond;
|
||||
std::shared_ptr<LLCoros::Promise<std::string>> respond;
|
||||
LLCoros::instance().launch("test<1>",
|
||||
[this, &respond](){ explicit_wait(respond); });
|
||||
mSync.bump();
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ namespace tut
|
|||
ensure("couldn't find stack Keyed", bool(found));
|
||||
ensure_equals("found wrong Keyed instance", found.get(), &one);
|
||||
{
|
||||
boost::scoped_ptr<Keyed> two(new Keyed("two"));
|
||||
std::unique_ptr<Keyed> two(new Keyed("two"));
|
||||
ensure_equals(Keyed::instanceCount(), 2);
|
||||
auto found = Keyed::getInstance("two");
|
||||
ensure("couldn't find heap Keyed", bool(found));
|
||||
|
|
@ -118,7 +118,7 @@ namespace tut
|
|||
std::weak_ptr<Unkeyed> found = one.getWeak();
|
||||
ensure(! found.expired());
|
||||
{
|
||||
boost::scoped_ptr<Unkeyed> two(new Unkeyed);
|
||||
std::unique_ptr<Unkeyed> two(new Unkeyed);
|
||||
ensure_equals(Unkeyed::instanceCount(), 2);
|
||||
}
|
||||
ensure_equals(Unkeyed::instanceCount(), 1);
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@
|
|||
// external library headers
|
||||
#include "llapr.h"
|
||||
#include "apr_thread_proc.h"
|
||||
#include <boost/foreach.hpp>
|
||||
#include <boost/function.hpp>
|
||||
#include <boost/algorithm/string/find_iterator.hpp>
|
||||
#include <boost/algorithm/string/finder.hpp>
|
||||
|
|
@ -323,7 +322,7 @@ namespace tut
|
|||
{
|
||||
/*==========================================================================*|
|
||||
std::string reason_str;
|
||||
BOOST_FOREACH(const ReasonCode& rcp, reasons)
|
||||
for (const ReasonCode& rcp : reasons)
|
||||
{
|
||||
if (reason == rcp.code)
|
||||
{
|
||||
|
|
@ -554,7 +553,7 @@ namespace tut
|
|||
catch (const failure&)
|
||||
{
|
||||
std::cout << "History:\n";
|
||||
BOOST_FOREACH(const Item& item, history)
|
||||
for (const Item& item : history)
|
||||
{
|
||||
std::string what(item.what);
|
||||
if ((! what.empty()) && what[what.length() - 1] == '\n')
|
||||
|
|
|
|||
|
|
@ -15,9 +15,6 @@
|
|||
#include "llstreamqueue.h"
|
||||
// STL headers
|
||||
#include <vector>
|
||||
// std headers
|
||||
// external library headers
|
||||
#include <boost/foreach.hpp>
|
||||
// other Linden headers
|
||||
#include "../test/lltut.h"
|
||||
#include "stringize.h"
|
||||
|
|
@ -133,7 +130,7 @@ namespace tut
|
|||
std::streamsize leave(5); // len("craft") above
|
||||
std::streamsize skip(total - leave);
|
||||
std::streamsize written(0);
|
||||
BOOST_FOREACH(const std::string& block, blocks)
|
||||
for (const std::string& block : blocks)
|
||||
{
|
||||
written += strq.write(&block[0], block.length());
|
||||
ensure_equals("size() after write()", strq.size(), written);
|
||||
|
|
@ -152,7 +149,7 @@ namespace tut
|
|||
{
|
||||
set_test_name("concatenate blocks");
|
||||
std::string blocks[] = { "abcd", "efghij", "klmnopqrs" };
|
||||
BOOST_FOREACH(const std::string& block, blocks)
|
||||
for (const std::string& block : blocks)
|
||||
{
|
||||
strq.write(&block[0], block.length());
|
||||
}
|
||||
|
|
@ -170,7 +167,7 @@ namespace tut
|
|||
{
|
||||
set_test_name("split blocks");
|
||||
std::string blocks[] = { "abcdefghijklm", "nopqrstuvwxyz" };
|
||||
BOOST_FOREACH(const std::string& block, blocks)
|
||||
for (const std::string& block : blocks)
|
||||
{
|
||||
strq.write(&block[0], block.length());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@
|
|||
// external library headers
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/range/iterator_range.hpp>
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
// associated header
|
||||
#include "../lltreeiterators.h"
|
||||
|
|
@ -402,7 +401,7 @@ private:
|
|||
*
|
||||
* Example:
|
||||
* @code
|
||||
* BOOST_FOREACH(TreeNodePtr node, getRootRange<LLTreeIter::UP>(somenode))
|
||||
* for (TreeNodePtr node : getRootRange<LLTreeIter::UP>(somenode))
|
||||
* {
|
||||
* std::cout << node->name() << '\n';
|
||||
* }
|
||||
|
|
@ -424,7 +423,7 @@ getRootRange(const TreeNodePtr& node)
|
|||
*
|
||||
* Example:
|
||||
* @code
|
||||
* BOOST_FOREACH(TreeNodePtr node, getWalkRange<LLTreeIter::DFS_PRE>(root))
|
||||
* for (TreeNodePtr node : getWalkRange<LLTreeIter::DFS_PRE>(root))
|
||||
* {
|
||||
* std::cout << node->name() << '\n';
|
||||
* }
|
||||
|
|
@ -520,7 +519,7 @@ public:
|
|||
*
|
||||
* Example usage:
|
||||
* @code
|
||||
* BOOST_FOREACH(EnhancedTreeNodePtr node, somenode->getRootRange<LLTreeIter::UP>())
|
||||
* for (EnhancedTreeNodePtr node : somenode->getRootRange<LLTreeIter::UP>())
|
||||
* {
|
||||
* std::cout << node->name() << '\n';
|
||||
* }
|
||||
|
|
@ -564,7 +563,7 @@ public:
|
|||
*
|
||||
* Example usage:
|
||||
* @code
|
||||
* BOOST_FOREACH(EnhancedTreeNodePtr node, somenode->getWalkRange<LLTreeIter::DFS_PRE>())
|
||||
* for (EnhancedTreeNodePtr node : somenode->getWalkRange<LLTreeIter::DFS_PRE>())
|
||||
* {
|
||||
* std::cout << node->name() << '\n';
|
||||
* }
|
||||
|
|
@ -644,7 +643,7 @@ LLLinkedIter<PlainTree> PlainTree_child_end(PlainTree* node)
|
|||
*
|
||||
* Example:
|
||||
* @code
|
||||
* BOOST_FOREACH(PlainTree* node, getRootRange<LLTreeIter::UP>(somenode))
|
||||
* for (PlainTree* node : getRootRange<LLTreeIter::UP>(somenode))
|
||||
* {
|
||||
* std::cout << node->name() << '\n';
|
||||
* }
|
||||
|
|
@ -668,7 +667,7 @@ getRootRange(PlainTree* node)
|
|||
*
|
||||
* Example:
|
||||
* @code
|
||||
* BOOST_FOREACH(PlainTree* node, getWalkRange<LLTreeIter::DFS_PRE>(root))
|
||||
* for (PlainTree* node : getWalkRange<LLTreeIter::DFS_PRE>(root))
|
||||
* {
|
||||
* std::cout << node->name() << '\n';
|
||||
* }
|
||||
|
|
@ -1103,18 +1102,18 @@ namespace tut
|
|||
// This test function illustrates the looping techniques described in the
|
||||
// comments for the getRootRange() free function, the
|
||||
// EnhancedTreeNode::root_range template and the
|
||||
// EnhancedTreeNode::getRootRange() method. Obviously the BOOST_FOREACH()
|
||||
// EnhancedTreeNode::getRootRange() method. Obviously the for()
|
||||
// forms are more succinct.
|
||||
TreeNodePtr tnroot(example_tree<TreeNode>());
|
||||
TreeNodePtr tnB2b(get_B2b<TreeNode, TreeNode::child_iterator>
|
||||
(tnroot, boost::bind(&TreeNode::child_begin, _1)));
|
||||
|
||||
std::string desc1("BOOST_FOREACH(TreeNodePr, getRootRange<LLTreeIter::UP>(tnB2b))");
|
||||
std::string desc1("for (TreeNodePr : getRootRange<LLTreeIter::UP>(tnB2b))");
|
||||
// std::cout << desc1 << "\n";
|
||||
// Although we've commented out the output statement, ensure that the
|
||||
// loop construct is still valid, as promised by the getRootRange()
|
||||
// documentation.
|
||||
BOOST_FOREACH(TreeNodePtr node, getRootRange<LLTreeIter::UP>(tnB2b))
|
||||
for (TreeNodePtr node : getRootRange<LLTreeIter::UP>(tnB2b))
|
||||
{
|
||||
// std::cout << node->name() << '\n';
|
||||
}
|
||||
|
|
@ -1137,9 +1136,9 @@ namespace tut
|
|||
// std::cout << (*ri)->name() << '\n';
|
||||
}
|
||||
|
||||
std::string desc2("BOOST_FOREACH(EnhancedTreeNodePtr node, etnB2b->getRootRange<LLTreeIter::UP>())");
|
||||
std::string desc2("for (EnhancedTreeNodePtr node : etnB2b->getRootRange<LLTreeIter::UP>())");
|
||||
// std::cout << desc2 << '\n';
|
||||
BOOST_FOREACH(EnhancedTreeNodePtr node, etnB2b->getRootRange<LLTreeIter::UP>())
|
||||
for (EnhancedTreeNodePtr node : etnB2b->getRootRange<LLTreeIter::UP>())
|
||||
{
|
||||
// std::cout << node->name() << '\n';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -218,12 +218,12 @@ public:
|
|||
/// for the sought string.
|
||||
std::string messageWith(const std::string& search, bool required=true)
|
||||
{
|
||||
return boost::dynamic_pointer_cast<CaptureLogRecorder>(mRecorder)->messageWith(search, required);
|
||||
return std::dynamic_pointer_cast<CaptureLogRecorder>(mRecorder)->messageWith(search, required);
|
||||
}
|
||||
|
||||
std::ostream& streamto(std::ostream& out) const
|
||||
{
|
||||
return boost::dynamic_pointer_cast<CaptureLogRecorder>(mRecorder)->streamto(out);
|
||||
return std::dynamic_pointer_cast<CaptureLogRecorder>(mRecorder)->streamto(out);
|
||||
}
|
||||
|
||||
friend inline std::ostream& operator<<(std::ostream& out, const CaptureLog& self)
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ private:
|
|||
void operator=(const HttpLibcurl &); // Not defined
|
||||
|
||||
public:
|
||||
typedef boost::shared_ptr<HttpOpRequest> opReqPtr_t;
|
||||
typedef std::shared_ptr<HttpOpRequest> opReqPtr_t;
|
||||
|
||||
/// Give cycles to libcurl to run active requests. Completed
|
||||
/// operations (successful or failed) will be retried or handed
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ HttpOperation::handleMap_t HttpOperation::mHandleMap;
|
|||
LLCoreInt::HttpMutex HttpOperation::mOpMutex;
|
||||
|
||||
HttpOperation::HttpOperation():
|
||||
boost::enable_shared_from_this<HttpOperation>(),
|
||||
std::enable_shared_from_this<HttpOperation>(),
|
||||
mReplyQueue(),
|
||||
mUserHandler(),
|
||||
mReqPolicy(HttpRequest::DEFAULT_POLICY_ID),
|
||||
|
|
|
|||
|
|
@ -69,12 +69,12 @@ class HttpService;
|
|||
/// and those interfaces establish the access rules.
|
||||
|
||||
class HttpOperation : private boost::noncopyable,
|
||||
public boost::enable_shared_from_this<HttpOperation>
|
||||
public std::enable_shared_from_this<HttpOperation>
|
||||
{
|
||||
public:
|
||||
typedef boost::shared_ptr<HttpOperation> ptr_t;
|
||||
typedef boost::weak_ptr<HttpOperation> wptr_t;
|
||||
typedef boost::shared_ptr<HttpReplyQueue> HttpReplyQueuePtr_t;
|
||||
typedef std::shared_ptr<HttpOperation> ptr_t;
|
||||
typedef std::weak_ptr<HttpOperation> wptr_t;
|
||||
typedef std::shared_ptr<HttpReplyQueue> HttpReplyQueuePtr_t;
|
||||
|
||||
/// Threading: called by consumer thread.
|
||||
HttpOperation();
|
||||
|
|
@ -157,12 +157,12 @@ public:
|
|||
HttpHandle getHandle();
|
||||
|
||||
template< class OPT >
|
||||
static boost::shared_ptr< OPT > fromHandle(HttpHandle handle)
|
||||
static std::shared_ptr< OPT > fromHandle(HttpHandle handle)
|
||||
{
|
||||
ptr_t ptr = findByHandle(handle);
|
||||
if (!ptr)
|
||||
return boost::shared_ptr< OPT >();
|
||||
return boost::dynamic_pointer_cast< OPT >(ptr);
|
||||
return std::shared_ptr< OPT >();
|
||||
return std::dynamic_pointer_cast< OPT >(ptr);
|
||||
}
|
||||
|
||||
protected:
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@ HttpOpRequest::~HttpOpRequest()
|
|||
void HttpOpRequest::stageFromRequest(HttpService * service)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK;
|
||||
HttpOpRequest::ptr_t self(boost::dynamic_pointer_cast<HttpOpRequest>(shared_from_this()));
|
||||
HttpOpRequest::ptr_t self(std::dynamic_pointer_cast<HttpOpRequest>(shared_from_this()));
|
||||
service->getPolicy().addOp(self); // transfers refcount
|
||||
}
|
||||
|
||||
|
|
@ -211,7 +211,7 @@ void HttpOpRequest::stageFromRequest(HttpService * service)
|
|||
void HttpOpRequest::stageFromReady(HttpService * service)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK;
|
||||
HttpOpRequest::ptr_t self(boost::dynamic_pointer_cast<HttpOpRequest>(shared_from_this()));
|
||||
HttpOpRequest::ptr_t self(std::dynamic_pointer_cast<HttpOpRequest>(shared_from_this()));
|
||||
service->getTransport().addOp(self); // transfers refcount
|
||||
}
|
||||
|
||||
|
|
@ -292,7 +292,7 @@ void HttpOpRequest::visitNotifier(HttpRequest * request)
|
|||
// HttpOpRequest::ptr_t HttpOpRequest::fromHandle(HttpHandle handle)
|
||||
// {
|
||||
//
|
||||
// return boost::dynamic_pointer_cast<HttpOpRequest>((static_cast<HttpOpRequest *>(handle))->shared_from_this());
|
||||
// return std::dynamic_pointer_cast<HttpOpRequest>((static_cast<HttpOpRequest *>(handle))->shared_from_this());
|
||||
// }
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ class BufferArray;
|
|||
class HttpOpRequest : public HttpOperation
|
||||
{
|
||||
public:
|
||||
typedef boost::shared_ptr<HttpOpRequest> ptr_t;
|
||||
typedef std::shared_ptr<HttpOpRequest> ptr_t;
|
||||
|
||||
HttpOpRequest();
|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ namespace LLCore
|
|||
class HttpOpSetGet : public HttpOperation
|
||||
{
|
||||
public:
|
||||
typedef boost::shared_ptr<HttpOpSetGet> ptr_t;
|
||||
typedef std::shared_ptr<HttpOpSetGet> ptr_t;
|
||||
|
||||
HttpOpSetGet();
|
||||
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ private:
|
|||
void operator=(const HttpPolicy &); // Not defined
|
||||
|
||||
public:
|
||||
typedef boost::shared_ptr<HttpOpRequest> opReqPtr_t;
|
||||
typedef std::shared_ptr<HttpOpRequest> opReqPtr_t;
|
||||
|
||||
/// Threading: called by init thread.
|
||||
HttpRequest::policy_t createPolicyClass();
|
||||
|
|
|
|||
|
|
@ -63,8 +63,8 @@ class HttpReplyQueue : private boost::noncopyable
|
|||
{
|
||||
|
||||
public:
|
||||
typedef boost::shared_ptr<HttpOperation> opPtr_t;
|
||||
typedef boost::shared_ptr<HttpReplyQueue> ptr_t;
|
||||
typedef std::shared_ptr<HttpOperation> opPtr_t;
|
||||
typedef std::shared_ptr<HttpReplyQueue> ptr_t;
|
||||
|
||||
HttpReplyQueue();
|
||||
virtual ~HttpReplyQueue();
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ private:
|
|||
void operator=(const HttpRequestQueue &); // Not defined
|
||||
|
||||
public:
|
||||
typedef boost::shared_ptr<HttpOperation> opPtr_t;
|
||||
typedef std::shared_ptr<HttpOperation> opPtr_t;
|
||||
|
||||
static void init();
|
||||
static void term();
|
||||
|
|
|
|||
|
|
@ -301,24 +301,24 @@ struct HttpStatus
|
|||
|
||||
HttpStatus()
|
||||
{
|
||||
mDetails = boost::shared_ptr<Details>(new Details(LLCORE, HE_SUCCESS));
|
||||
mDetails = std::shared_ptr<Details>(new Details(LLCORE, HE_SUCCESS));
|
||||
}
|
||||
|
||||
HttpStatus(type_enum_t type, short status)
|
||||
{
|
||||
mDetails = boost::shared_ptr<Details>(new Details(type, status));
|
||||
mDetails = std::shared_ptr<Details>(new Details(type, status));
|
||||
}
|
||||
|
||||
HttpStatus(int http_status)
|
||||
{
|
||||
mDetails = boost::shared_ptr<Details>(new Details(http_status,
|
||||
mDetails = std::shared_ptr<Details>(new Details(http_status,
|
||||
(http_status >= 200 && http_status <= 299) ? HE_SUCCESS : HE_REPLY_ERROR));
|
||||
llassert(http_status >= 100 && http_status <= 999);
|
||||
}
|
||||
|
||||
HttpStatus(int http_status, const std::string &message)
|
||||
{
|
||||
mDetails = boost::shared_ptr<Details>(new Details(http_status,
|
||||
mDetails = std::shared_ptr<Details>(new Details(http_status,
|
||||
(http_status >= 200 && http_status <= 299) ? HE_SUCCESS : HE_REPLY_ERROR));
|
||||
llassert(http_status >= 100 && http_status <= 999);
|
||||
mDetails->mMessage = message;
|
||||
|
|
@ -341,7 +341,7 @@ struct HttpStatus
|
|||
|
||||
HttpStatus & clone(const HttpStatus &rhs)
|
||||
{
|
||||
mDetails = boost::shared_ptr<Details>(new Details(*rhs.mDetails));
|
||||
mDetails = std::shared_ptr<Details>(new Details(*rhs.mDetails));
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
|
@ -490,14 +490,14 @@ private:
|
|||
LLSD mErrorData;
|
||||
};
|
||||
|
||||
boost::shared_ptr<Details> mDetails;
|
||||
std::shared_ptr<Details> mDetails;
|
||||
|
||||
}; // end struct HttpStatus
|
||||
|
||||
/// A namespace for several free methods and low level utilities.
|
||||
namespace LLHttp
|
||||
{
|
||||
typedef boost::shared_ptr<CURL> CURL_ptr;
|
||||
typedef std::shared_ptr<CURL> CURL_ptr;
|
||||
|
||||
void initialize();
|
||||
void cleanup();
|
||||
|
|
|
|||
|
|
@ -58,8 +58,8 @@ class HttpResponse;
|
|||
class HttpHandler
|
||||
{
|
||||
public:
|
||||
typedef boost::shared_ptr<HttpHandler> ptr_t;
|
||||
typedef boost::weak_ptr<HttpHandler> wptr_t;
|
||||
typedef std::shared_ptr<HttpHandler> ptr_t;
|
||||
typedef std::weak_ptr<HttpHandler> wptr_t;
|
||||
|
||||
virtual ~HttpHandler()
|
||||
{ }
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ public:
|
|||
typedef container_t::const_reverse_iterator const_reverse_iterator;
|
||||
typedef container_t::value_type value_type;
|
||||
typedef container_t::size_type size_type;
|
||||
typedef boost::shared_ptr<HttpHeaders> ptr_t;
|
||||
typedef std::shared_ptr<HttpHeaders> ptr_t;
|
||||
|
||||
public:
|
||||
/// @post In addition to the instance, caller has a refcount
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ class HttpOptions : private boost::noncopyable
|
|||
public:
|
||||
HttpOptions();
|
||||
|
||||
typedef boost::shared_ptr<HttpOptions> ptr_t;
|
||||
typedef std::shared_ptr<HttpOptions> ptr_t;
|
||||
|
||||
virtual ~HttpOptions(); // Use release()
|
||||
|
||||
|
|
|
|||
|
|
@ -96,8 +96,8 @@ private:
|
|||
public:
|
||||
typedef unsigned int policy_t;
|
||||
|
||||
typedef boost::shared_ptr<HttpRequest> ptr_t;
|
||||
typedef boost::weak_ptr<HttpRequest> wptr_t;
|
||||
typedef std::shared_ptr<HttpRequest> ptr_t;
|
||||
typedef std::weak_ptr<HttpRequest> wptr_t;
|
||||
public:
|
||||
/// @name PolicyMethods
|
||||
/// @{
|
||||
|
|
@ -627,7 +627,7 @@ public:
|
|||
protected:
|
||||
|
||||
private:
|
||||
typedef boost::shared_ptr<HttpReplyQueue> HttpReplyQueuePtr_t;
|
||||
typedef std::shared_ptr<HttpReplyQueue> HttpReplyQueuePtr_t;
|
||||
|
||||
/// @name InstanceData
|
||||
///
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ public:
|
|||
/// Statistics for the HTTP
|
||||
struct TransferStats
|
||||
{
|
||||
typedef boost::shared_ptr<TransferStats> ptr_t;
|
||||
typedef std::shared_ptr<TransferStats> ptr_t;
|
||||
|
||||
TransferStats() : mSizeDownload(0.0), mTotalTime(0.0), mSpeedDownload(0.0) {}
|
||||
F64 mSizeDownload;
|
||||
|
|
|
|||
|
|
@ -44,7 +44,6 @@
|
|||
#include "stringize.h"
|
||||
#include "llstring.h"
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/foreach.hpp>
|
||||
#include <boost/range/begin.hpp>
|
||||
#include <boost/range/end.hpp>
|
||||
#include <boost/assign/list_of.hpp>
|
||||
|
|
@ -746,10 +745,10 @@ void LLDir::walkSearchSkinDirs(const std::string& subdir,
|
|||
const std::string& filename,
|
||||
const FUNCTION& function) const
|
||||
{
|
||||
BOOST_FOREACH(std::string skindir, mSearchSkinDirs)
|
||||
for (const std::string& skindir : mSearchSkinDirs)
|
||||
{
|
||||
std::string subdir_path(add(skindir, subdir));
|
||||
BOOST_FOREACH(std::string subsubdir, subsubdirs)
|
||||
for (const std::string& subsubdir : subsubdirs)
|
||||
{
|
||||
std::string full_path(add(subdir_path, subsubdir, filename));
|
||||
|
||||
|
|
@ -908,7 +907,7 @@ std::vector<std::string> LLDir::findSkinnedFilenames(const std::string& subdir,
|
|||
// current language, copy them -- in proper order -- into results.
|
||||
// Don't drive this by walking the map itself: it matters that we
|
||||
// generate results in the same order as subsubdirs.
|
||||
BOOST_FOREACH(std::string subsubdir, subsubdirs)
|
||||
for (const std::string& subsubdir : subsubdirs)
|
||||
{
|
||||
StringMap::const_iterator found(path_for.find(subsubdir));
|
||||
if (found != path_for.end())
|
||||
|
|
@ -920,7 +919,7 @@ std::vector<std::string> LLDir::findSkinnedFilenames(const std::string& subdir,
|
|||
|
||||
LL_DEBUGS("LLDir") << empty;
|
||||
const char* comma = "";
|
||||
BOOST_FOREACH(std::string path, results)
|
||||
for (const std::string& path : results)
|
||||
{
|
||||
LL_CONT << comma << "'" << path << "'";
|
||||
comma = ", ";
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@
|
|||
|
||||
#include "../test/lltut.h"
|
||||
#include "stringize.h"
|
||||
#include <boost/foreach.hpp>
|
||||
#include <boost/assign/list_of.hpp>
|
||||
|
||||
using boost::assign::list_of;
|
||||
|
|
@ -109,7 +108,7 @@ struct LLDir_Dummy: public LLDir
|
|||
|
||||
"install/skins/default/future/somefile.txt"
|
||||
};
|
||||
BOOST_FOREACH(const char* path, preload)
|
||||
for (const char* path : preload)
|
||||
{
|
||||
buildFilesystem(path);
|
||||
}
|
||||
|
|
@ -166,7 +165,7 @@ struct LLDir_Dummy: public LLDir
|
|||
LLStringUtil::getTokens(path, components, "/");
|
||||
// Ensure we have an entry representing every level of this path
|
||||
std::string partial;
|
||||
BOOST_FOREACH(std::string component, components)
|
||||
for (std::string component : components)
|
||||
{
|
||||
append(partial, component);
|
||||
mFilesystem.insert(partial);
|
||||
|
|
|
|||
|
|
@ -2304,9 +2304,9 @@ bool LLImageFormatted::save(const std::string &filename)
|
|||
return false;
|
||||
}
|
||||
|
||||
outfile.write(getData(), getDataSize());
|
||||
S32 result = outfile.write(getData(), getDataSize());
|
||||
outfile.close() ;
|
||||
return true;
|
||||
return (result != 0);
|
||||
}
|
||||
|
||||
S8 LLImageFormatted::getCodec() const
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ std::string LLImageJ2C::getEngineInfo()
|
|||
{
|
||||
// All known LLImageJ2CImpl implementation subclasses are cheap to
|
||||
// construct.
|
||||
boost::scoped_ptr<LLImageJ2CImpl> impl(fallbackCreateLLImageJ2CImpl());
|
||||
std::unique_ptr<LLImageJ2CImpl> impl(fallbackCreateLLImageJ2CImpl());
|
||||
return impl->getEngineInfo();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ protected:
|
|||
S8 mRawDiscardLevel;
|
||||
F32 mRate;
|
||||
bool mReversible;
|
||||
boost::scoped_ptr<LLImageJ2CImpl> mImpl;
|
||||
std::unique_ptr<LLImageJ2CImpl> mImpl;
|
||||
std::string mLastError;
|
||||
|
||||
// Image compression/decompression tester
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@
|
|||
#include "llinventorydefines.h"
|
||||
#include "llxorcipher.h"
|
||||
#include "llsd.h"
|
||||
#include "llsdserialize.h"
|
||||
#include "message.h"
|
||||
#include <boost/tokenizer.hpp>
|
||||
|
||||
|
|
@ -217,7 +218,19 @@ BOOL LLInventoryObject::importLegacyStream(std::istream& input_stream)
|
|||
}
|
||||
else if (0 == strcmp("metadata", keyword))
|
||||
{
|
||||
LLSD metadata(valuestr);
|
||||
LLSD metadata;
|
||||
if (strncmp("<llsd>", valuestr, 6) == 0)
|
||||
{
|
||||
std::istringstream stream(valuestr);
|
||||
LLSDSerialize::fromXML(metadata, stream);
|
||||
}
|
||||
else
|
||||
{
|
||||
// next line likely contains metadata, but at the moment is not supported
|
||||
// can do something like:
|
||||
// LLSDSerialize::fromNotation(metadata, input_stream, -1);
|
||||
}
|
||||
|
||||
if (metadata.has("thumbnail"))
|
||||
{
|
||||
const LLSD& thumbnail = metadata["thumbnail"];
|
||||
|
|
@ -771,7 +784,19 @@ BOOL LLInventoryItem::importLegacyStream(std::istream& input_stream)
|
|||
}
|
||||
else if (0 == strcmp("metadata", keyword))
|
||||
{
|
||||
LLSD metadata(valuestr);
|
||||
LLSD metadata;
|
||||
if (strncmp("<llsd>", valuestr, 6) == 0)
|
||||
{
|
||||
std::istringstream stream(valuestr);
|
||||
LLSDSerialize::fromXML(metadata, stream);
|
||||
}
|
||||
else
|
||||
{
|
||||
// next line likely contains metadata, but at the moment is not supported
|
||||
// can do something like:
|
||||
// LLSDSerialize::fromNotation(metadata, input_stream, -1);
|
||||
}
|
||||
|
||||
if (metadata.has("thumbnail"))
|
||||
{
|
||||
const LLSD& thumbnail = metadata["thumbnail"];
|
||||
|
|
@ -880,9 +905,14 @@ BOOL LLInventoryItem::exportLegacyStream(std::ostream& output_stream, BOOL inclu
|
|||
|
||||
if (mThumbnailUUID.notNull())
|
||||
{
|
||||
// Max length is 255 chars, will have to export differently if it gets more data
|
||||
// Ex: use newline and toNotation (uses {}) for unlimited size
|
||||
LLSD metadata;
|
||||
metadata["thumbnail"] = LLSD().with("asset_id", mThumbnailUUID);
|
||||
output_stream << "\t\tmetadata\t" << metadata << "|\n";
|
||||
|
||||
output_stream << "\t\tmetadata\t";
|
||||
LLSDSerialize::toXML(metadata, output_stream);
|
||||
output_stream << "|\n";
|
||||
}
|
||||
|
||||
// Check for permissions to see the asset id, and if so write it
|
||||
|
|
@ -1381,7 +1411,19 @@ BOOL LLInventoryCategory::importLegacyStream(std::istream& input_stream)
|
|||
}
|
||||
else if (0 == strcmp("metadata", keyword))
|
||||
{
|
||||
LLSD metadata(valuestr);
|
||||
LLSD metadata;
|
||||
if (strncmp("<llsd>", valuestr, 6) == 0)
|
||||
{
|
||||
std::istringstream stream(valuestr);
|
||||
LLSDSerialize::fromXML(metadata, stream);
|
||||
}
|
||||
else
|
||||
{
|
||||
// next line likely contains metadata, but at the moment is not supported
|
||||
// can do something like:
|
||||
// LLSDSerialize::fromNotation(metadata, input_stream, -1);
|
||||
}
|
||||
|
||||
if (metadata.has("thumbnail"))
|
||||
{
|
||||
const LLSD& thumbnail = metadata["thumbnail"];
|
||||
|
|
@ -1421,9 +1463,12 @@ BOOL LLInventoryCategory::exportLegacyStream(std::ostream& output_stream, BOOL)
|
|||
output_stream << "\t\tname\t" << mName.c_str() << "|\n";
|
||||
if (mThumbnailUUID.notNull())
|
||||
{
|
||||
// Only up to 255 chars
|
||||
LLSD metadata;
|
||||
metadata["thumbnail"] = LLSD().with("asset_id", mThumbnailUUID);
|
||||
output_stream << "\t\tmetadata\t" << metadata << "|\n";
|
||||
output_stream << "\t\tmetadata\t";
|
||||
LLSDSerialize::toXML(metadata, output_stream);
|
||||
output_stream << "|\n";
|
||||
}
|
||||
output_stream << "\t}\n";
|
||||
return TRUE;
|
||||
|
|
|
|||
|
|
@ -116,10 +116,10 @@ private:
|
|||
};
|
||||
|
||||
// Encode variable
|
||||
boost::scoped_ptr<LLKDUMemSource> mInputp;
|
||||
std::unique_ptr<LLKDUMemSource> mInputp;
|
||||
CodeStreamHolder mCodeStreamp;
|
||||
boost::scoped_ptr<kdu_core::kdu_coords> mTPosp; // tile position
|
||||
boost::scoped_ptr<kdu_core::kdu_dims> mTileIndicesp;
|
||||
std::unique_ptr<kdu_core::kdu_coords> mTPosp; // tile position
|
||||
std::unique_ptr<kdu_core::kdu_dims> mTileIndicesp;
|
||||
int mBlocksSize;
|
||||
int mPrecinctsSize;
|
||||
int mLevels;
|
||||
|
|
@ -128,7 +128,7 @@ private:
|
|||
// We don't own this LLImageRaw. We're simply pointing to an instance
|
||||
// passed into initDecode().
|
||||
LLImageRaw *mRawImagep;
|
||||
boost::scoped_ptr<LLKDUDecodeState> mDecodeState;
|
||||
std::unique_ptr<LLKDUDecodeState> mDecodeState;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1003,7 +1003,7 @@ class LLVolume : public LLRefCount
|
|||
friend class LLVolumeLODGroup;
|
||||
|
||||
protected:
|
||||
~LLVolume(); // use unref
|
||||
virtual ~LLVolume(); // use unref
|
||||
|
||||
public:
|
||||
typedef std::vector<LLVolumeFace> face_list_t;
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ public:
|
|||
private:
|
||||
struct QueuedCoproc
|
||||
{
|
||||
typedef boost::shared_ptr<QueuedCoproc> ptr_t;
|
||||
typedef std::shared_ptr<QueuedCoproc> ptr_t;
|
||||
|
||||
QueuedCoproc(const std::string &name, const LLUUID &id, CoProcedure_t proc) :
|
||||
mName(name),
|
||||
|
|
@ -115,7 +115,7 @@ private:
|
|||
// Use shared_ptr to control the lifespan of our CoprocQueue_t instance
|
||||
// because the consuming coroutine might outlive this LLCoprocedurePool
|
||||
// instance.
|
||||
typedef boost::shared_ptr<CoprocQueue_t> CoprocQueuePtr;
|
||||
typedef std::shared_ptr<CoprocQueue_t> CoprocQueuePtr;
|
||||
|
||||
std::string mPoolName;
|
||||
size_t mPoolSize, mActiveCoprocsCount, mPending;
|
||||
|
|
@ -301,7 +301,7 @@ LLCoprocedurePool::LLCoprocedurePool(const std::string &poolName, size_t size):
|
|||
mPoolSize(size),
|
||||
mActiveCoprocsCount(0),
|
||||
mPending(0),
|
||||
mPendingCoprocs(boost::make_shared<CoprocQueue_t>(LLCoprocedureManager::DEFAULT_QUEUE_SIZE)),
|
||||
mPendingCoprocs(std::make_shared<CoprocQueue_t>(LLCoprocedureManager::DEFAULT_QUEUE_SIZE)),
|
||||
mHTTPPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID),
|
||||
mCoroMapping()
|
||||
{
|
||||
|
|
@ -384,7 +384,7 @@ LLUUID LLCoprocedurePool::enqueueCoprocedure(const std::string &name, LLCoproced
|
|||
LL_DEBUGS("CoProcMgr") << "Coprocedure(" << name << ") enqueuing with id=" << id.asString() << " in pool \"" << mPoolName << "\" at "
|
||||
<< mPending << LL_ENDL;
|
||||
}
|
||||
auto pushed = mPendingCoprocs->try_push(boost::make_shared<QueuedCoproc>(name, id, proc));
|
||||
auto pushed = mPendingCoprocs->try_push(std::make_shared<QueuedCoproc>(name, id, proc));
|
||||
if (pushed == boost::fibers::channel_op_status::success)
|
||||
{
|
||||
++mPending;
|
||||
|
|
|
|||
|
|
@ -263,8 +263,8 @@ class HttpCoroHandler : public LLCore::HttpHandler
|
|||
{
|
||||
public:
|
||||
|
||||
typedef boost::shared_ptr<HttpCoroHandler> ptr_t;
|
||||
typedef boost::weak_ptr<HttpCoroHandler> wptr_t;
|
||||
typedef std::shared_ptr<HttpCoroHandler> ptr_t;
|
||||
typedef std::weak_ptr<HttpCoroHandler> wptr_t;
|
||||
|
||||
HttpCoroHandler(LLEventStream &reply);
|
||||
|
||||
|
|
@ -317,8 +317,8 @@ public:
|
|||
static const std::string HTTP_RESULTS_CONTENT;
|
||||
static const std::string HTTP_RESULTS_RAW;
|
||||
|
||||
typedef boost::shared_ptr<HttpCoroutineAdapter> ptr_t;
|
||||
typedef boost::weak_ptr<HttpCoroutineAdapter> wptr_t;
|
||||
typedef std::shared_ptr<HttpCoroutineAdapter> ptr_t;
|
||||
typedef std::weak_ptr<HttpCoroutineAdapter> wptr_t;
|
||||
|
||||
HttpCoroutineAdapter(const std::string &name, LLCore::HttpRequest::policy_t policyId);
|
||||
~HttpCoroutineAdapter();
|
||||
|
|
|
|||
|
|
@ -298,6 +298,13 @@ BOOL LLDataPackerBinaryBuffer::unpackBinaryData(U8 *value, S32 &size, const char
|
|||
}
|
||||
|
||||
htolememcpy(&size, mCurBufferp, MVT_S32, 4);
|
||||
|
||||
if (size < 0)
|
||||
{
|
||||
LL_WARNS() << "LLDataPackerBinaryBuffer::unpackBinaryData unpacked invalid size, aborting!" << LL_ENDL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
mCurBufferp += 4;
|
||||
|
||||
if (!verifyLength(size, name))
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ private:
|
|||
|
||||
// Callback types for get()
|
||||
typedef boost::signals2::signal < void(const LLSD &) > callback_signal_t;
|
||||
typedef boost::shared_ptr<callback_signal_t> signal_ptr;
|
||||
typedef std::shared_ptr<callback_signal_t> signal_ptr;
|
||||
// May have multiple callbacks for a single ID, which are
|
||||
// represented as multiple slots bound to the signal.
|
||||
// Avoid copying signals via pointers.
|
||||
|
|
|
|||
|
|
@ -982,7 +982,7 @@ LLHTTPNode& LLIOHTTPServer::create(
|
|||
}
|
||||
|
||||
LLHTTPResponseFactory* factory = new LLHTTPResponseFactory;
|
||||
boost::shared_ptr<LLChainIOFactory> factory_ptr(factory);
|
||||
std::shared_ptr<LLChainIOFactory> factory_ptr(factory);
|
||||
|
||||
LLIOServerSocket* server = new LLIOServerSocket(pool, socket, factory_ptr);
|
||||
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ public:
|
|||
/**
|
||||
* @brief Scattered memory container.
|
||||
*/
|
||||
typedef boost::shared_ptr<LLBufferArray> buffer_ptr_t;
|
||||
typedef std::shared_ptr<LLBufferArray> buffer_ptr_t;
|
||||
|
||||
/**
|
||||
* @brief Enumeration for IO return codes
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ public:
|
|||
/**
|
||||
* @brief Reference counted shared pointers to sockets.
|
||||
*/
|
||||
typedef boost::shared_ptr<LLSocket> ptr_t;
|
||||
typedef std::shared_ptr<LLSocket> ptr_t;
|
||||
|
||||
/**
|
||||
* @brief Type of socket to create.
|
||||
|
|
@ -305,7 +305,7 @@ class LLIOServerSocket : public LLIOPipe
|
|||
{
|
||||
public:
|
||||
typedef LLSocket::ptr_t socket_t;
|
||||
typedef boost::shared_ptr<LLChainIOFactory> factory_t;
|
||||
typedef std::shared_ptr<LLChainIOFactory> factory_t;
|
||||
LLIOServerSocket(apr_pool_t* pool, socket_t listener, factory_t reactor);
|
||||
virtual ~LLIOServerSocket();
|
||||
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ class LLService : public LLIOPipe
|
|||
public:
|
||||
//typedef boost::intrusive_ptr<LLServiceCreator> creator_t;
|
||||
//typedef boost::intrusive_ptr<LLService> service_t;
|
||||
typedef boost::shared_ptr<LLChainIOFactory> creator_t;
|
||||
typedef std::shared_ptr<LLChainIOFactory> creator_t;
|
||||
|
||||
/**
|
||||
* @brief This method is used to register a protocol name with a
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ private:
|
|||
std::string mName;
|
||||
};
|
||||
|
||||
typedef boost::shared_ptr<LLStoredMessage> LLStoredMessagePtr;
|
||||
typedef std::shared_ptr<LLStoredMessage> LLStoredMessagePtr;
|
||||
|
||||
|
||||
#endif // LL_STOREDMESSAGE_H
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ void LLCurl::Responder::httpCompleted()
|
|||
}
|
||||
|
||||
void LLCurl::Responder::completedRaw(LLChannelDescriptors const&,
|
||||
boost::shared_ptr<LLBufferArray> const&)
|
||||
std::shared_ptr<LLBufferArray> const&)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -335,7 +335,7 @@ public:
|
|||
// "init_history" message
|
||||
void initializeUrlHistory(const LLSD& url_history);
|
||||
|
||||
boost::shared_ptr<LLPluginClassMedia> getSharedPtr() { return boost::dynamic_pointer_cast<LLPluginClassMedia>(shared_from_this()); } // due to enable_shared_from_this
|
||||
std::shared_ptr<LLPluginClassMedia> getSharedPtr() { return std::dynamic_pointer_cast<LLPluginClassMedia>(shared_from_this()); } // due to enable_shared_from_this
|
||||
|
||||
protected:
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@
|
|||
#include "llsd.h"
|
||||
#include "llevents.h"
|
||||
|
||||
class LLPluginProcessParentOwner : public boost::enable_shared_from_this < LLPluginProcessParentOwner >
|
||||
class LLPluginProcessParentOwner : public std::enable_shared_from_this < LLPluginProcessParentOwner >
|
||||
{
|
||||
public:
|
||||
virtual ~LLPluginProcessParentOwner();
|
||||
|
|
@ -60,7 +60,7 @@ class LLPluginProcessParent : public LLPluginMessagePipeOwner
|
|||
|
||||
LLPluginProcessParent(LLPluginProcessParentOwner *owner);
|
||||
public:
|
||||
typedef boost::shared_ptr<LLPluginProcessParent> ptr_t;
|
||||
typedef std::shared_ptr<LLPluginProcessParent> ptr_t;
|
||||
|
||||
~LLPluginProcessParent();
|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,6 @@
|
|||
#pragma warning (default : 4264)
|
||||
#endif
|
||||
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <boost/algorithm/string/replace.hpp>
|
||||
|
||||
#include "lldaeloader.h"
|
||||
|
|
@ -958,7 +957,7 @@ LLDAELoader::LLDAELoader(
|
|||
mPreprocessDAE(preprocess)
|
||||
{
|
||||
// <FS:Beq> mesh loader suffix configuration
|
||||
for(int i=0;i<LLModel::NUM_LODS;i++)
|
||||
for (int i = 0; i < LLModel::NUM_LODS; i++)
|
||||
{
|
||||
LLDAELoader::sLODSuffix[i] = lod_suffix[i];
|
||||
}
|
||||
|
|
@ -2473,7 +2472,7 @@ std::string LLDAELoader::getElementLabel(daeElement *element)
|
|||
|
||||
if (ind > 0)
|
||||
{
|
||||
index_string = "_" + boost::lexical_cast<std::string>(ind);
|
||||
index_string = "_" + std::to_string(ind);
|
||||
}
|
||||
|
||||
// if parent has a name or ID, use it
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
#define LL_LLDAELOADER_H
|
||||
|
||||
#include "llmodelloader.h"
|
||||
#include <array> // <FS:Beq/> configurable lod suffixes
|
||||
|
||||
class DAE;
|
||||
class daeElement;
|
||||
|
|
|
|||
|
|
@ -48,8 +48,6 @@
|
|||
|
||||
// TODO: includes inherited from dae loader. Validate / prune
|
||||
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
#include "llsdserialize.h"
|
||||
#include "lljoint.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@ LLModel::~LLModel()
|
|||
{
|
||||
LLConvexDecomposition::getInstance()->deleteDecomposition(mDecompID);
|
||||
}
|
||||
mPhysics.mMesh.clear();
|
||||
}
|
||||
|
||||
//static
|
||||
|
|
|
|||
|
|
@ -111,6 +111,8 @@ public:
|
|||
std::vector<LLVector3> mPositions;
|
||||
std::vector<LLVector3> mNormals;
|
||||
|
||||
~PhysicsMesh() {}
|
||||
|
||||
void clear()
|
||||
{
|
||||
mPositions.clear();
|
||||
|
|
@ -136,6 +138,7 @@ public:
|
|||
public:
|
||||
Decomposition() { }
|
||||
Decomposition(LLSD& data);
|
||||
~Decomposition() { }
|
||||
void fromLLSD(LLSD& data);
|
||||
LLSD asLLSD() const;
|
||||
bool hasHullList() const;
|
||||
|
|
@ -370,7 +373,7 @@ class LLModelInstanceBase
|
|||
{
|
||||
public:
|
||||
LLPointer<LLModel> mModel;
|
||||
LLPointer<LLModel> mLOD[5];
|
||||
LLPointer<LLModel> mLOD[LLModel::NUM_LODS];
|
||||
LLUUID mMeshID;
|
||||
|
||||
LLMatrix4 mTransform;
|
||||
|
|
@ -385,6 +388,15 @@ public:
|
|||
: mModel(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~LLModelInstanceBase()
|
||||
{
|
||||
mModel = NULL;
|
||||
for (int j = 0; j < LLModel::NUM_LODS; ++j)
|
||||
{
|
||||
mLOD[j] = NULL;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
typedef std::vector<LLModelInstanceBase> model_instance_list;
|
||||
|
|
@ -404,6 +416,8 @@ public:
|
|||
|
||||
LLModelInstance(LLSD& data);
|
||||
|
||||
~LLModelInstance() {}
|
||||
|
||||
LLSD asLLSD();
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -211,7 +211,7 @@ namespace tut
|
|||
|
||||
void whitelist_test(int num, bool enable, const char *whitelist, const char *candidate_url, bool expected_pass)
|
||||
{
|
||||
std::string message = "Whitelist test " + boost::lexical_cast<std::string>(num);
|
||||
std::string message = "Whitelist test " + std::to_string(num);
|
||||
LLMediaEntry entry;
|
||||
entry.setWhiteListEnable(enable);
|
||||
set_whitelist(entry, whitelist);
|
||||
|
|
|
|||
|
|
@ -34,8 +34,6 @@
|
|||
#include "llerror.h"
|
||||
#include "llxuiparser.h"
|
||||
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
|
||||
//
|
||||
// LLCommandId class
|
||||
|
|
@ -186,7 +184,7 @@ bool LLCommandManager::load()
|
|||
return false;
|
||||
}
|
||||
|
||||
BOOST_FOREACH(LLCommand::Params& commandParams, commandsParams.commands)
|
||||
for (const LLCommand::Params& commandParams : commandsParams.commands)
|
||||
{
|
||||
LLCommand * command = new LLCommand(commandParams);
|
||||
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ class LLFilterEditor : public LLSearchEditor
|
|||
public:
|
||||
struct Params : public LLInitParam::Block<Params, LLSearchEditor::Params>
|
||||
{};
|
||||
virtual ~LLFilterEditor() {}
|
||||
|
||||
protected:
|
||||
LLFilterEditor(const Params&);
|
||||
|
|
|
|||
|
|
@ -59,7 +59,6 @@
|
|||
#include "llmultifloater.h"
|
||||
#include "llsdutil.h"
|
||||
#include "lluiusage.h"
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
|
||||
// use this to control "jumping" behavior when Ctrl-Tabbing
|
||||
|
|
@ -1973,6 +1972,8 @@ void LLFloater::onClickTearOff(LLFloater* self)
|
|||
{
|
||||
if (self->mSaveRect)
|
||||
{
|
||||
LLRect screen_rect = self->calcScreenRect();
|
||||
self->mPosition = LLCoordGL(screen_rect.getCenterX(), screen_rect.getCenterY()).convert();
|
||||
self->storeRectControl();
|
||||
}
|
||||
self->setMinimized(FALSE); // to reenable minimize button if it was minimized
|
||||
|
|
@ -2684,7 +2685,7 @@ void LLFloaterView::reshape(S32 width, S32 height, BOOL called_from_parent)
|
|||
//{
|
||||
// floaterp->translate(translate_x, translate_y);
|
||||
//}
|
||||
BOOST_FOREACH(LLHandle<LLFloater> dependent_floater, floaterp->mDependents)
|
||||
for (LLHandle<LLFloater> dependent_floater : floaterp->mDependents)
|
||||
{
|
||||
if (dependent_floater.get())
|
||||
{
|
||||
|
|
@ -2699,10 +2700,9 @@ void LLFloaterView::reshape(S32 width, S32 height, BOOL called_from_parent)
|
|||
void LLFloaterView::restoreAll()
|
||||
{
|
||||
// make sure all subwindows aren't minimized
|
||||
child_list_t child_list = *(getChildList());
|
||||
for (child_list_const_iter_t child_it = child_list.begin(); child_it != child_list.end(); ++child_it)
|
||||
for (auto child : *getChildList())
|
||||
{
|
||||
LLFloater* floaterp = dynamic_cast<LLFloater*>(*child_it);
|
||||
LLFloater* floaterp = dynamic_cast<LLFloater*>(child);
|
||||
if (floaterp)
|
||||
{
|
||||
floaterp->setMinimized(FALSE);
|
||||
|
|
|
|||
|
|
@ -453,8 +453,7 @@ void LLLayoutStack::updateLayout()
|
|||
: getRect().getHeight();
|
||||
|
||||
// first, assign minimum dimensions
|
||||
LLLayoutPanel* panelp = NULL;
|
||||
BOOST_FOREACH(panelp, mPanels)
|
||||
for (LLLayoutPanel* panelp : mPanels)
|
||||
{
|
||||
if (panelp->mAutoResize)
|
||||
{
|
||||
|
|
@ -467,12 +466,15 @@ void LLLayoutStack::updateLayout()
|
|||
llassert(total_visible_fraction < 1.05f);
|
||||
|
||||
// don't need spacing after last panel
|
||||
space_to_distribute += panelp ? ll_round((F32)mPanelSpacing * panelp->getVisibleAmount()) : 0;
|
||||
if (!mPanels.empty())
|
||||
{
|
||||
space_to_distribute += ll_round(F32(mPanelSpacing) * mPanels.back()->getVisibleAmount());
|
||||
}
|
||||
|
||||
S32 remaining_space = space_to_distribute;
|
||||
if (space_to_distribute > 0 && total_visible_fraction > 0.f)
|
||||
{ // give space proportionally to visible auto resize panels
|
||||
BOOST_FOREACH(LLLayoutPanel* panelp, mPanels)
|
||||
for (LLLayoutPanel* panelp : mPanels)
|
||||
{
|
||||
if (panelp->mAutoResize)
|
||||
{
|
||||
|
|
@ -485,7 +487,7 @@ void LLLayoutStack::updateLayout()
|
|||
}
|
||||
|
||||
// distribute any left over pixels to non-collapsed, visible panels
|
||||
BOOST_FOREACH(LLLayoutPanel* panelp, mPanels)
|
||||
for (LLLayoutPanel* panelp : mPanels)
|
||||
{
|
||||
if (remaining_space == 0) break;
|
||||
|
||||
|
|
@ -504,7 +506,7 @@ void LLLayoutStack::updateLayout()
|
|||
// <FS:Zi> Record new size for this panel
|
||||
mSavedSizes = LLSD();
|
||||
// </FS:Zi>
|
||||
BOOST_FOREACH(LLLayoutPanel* panelp, mPanels)
|
||||
for (LLLayoutPanel* panelp : mPanels)
|
||||
{
|
||||
F32 panel_dim = llmax(panelp->getExpandedMinDim(), panelp->mTargetDim);
|
||||
|
||||
|
|
@ -606,7 +608,7 @@ LLLayoutPanel* LLLayoutStack::findEmbeddedPanel(LLPanel* panelp) const
|
|||
{
|
||||
if (!panelp) return NULL;
|
||||
|
||||
BOOST_FOREACH(LLLayoutPanel* p, mPanels)
|
||||
for (LLLayoutPanel* p : mPanels)
|
||||
{
|
||||
if (p == panelp)
|
||||
{
|
||||
|
|
@ -620,7 +622,7 @@ LLLayoutPanel* LLLayoutStack::findEmbeddedPanelByName(const std::string& name) c
|
|||
{
|
||||
LLLayoutPanel* result = NULL;
|
||||
|
||||
BOOST_FOREACH(LLLayoutPanel* p, mPanels)
|
||||
for (LLLayoutPanel* p : mPanels)
|
||||
{
|
||||
if (p->getName() == name)
|
||||
{
|
||||
|
|
@ -634,7 +636,7 @@ LLLayoutPanel* LLLayoutStack::findEmbeddedPanelByName(const std::string& name) c
|
|||
|
||||
void LLLayoutStack::createResizeBar(LLLayoutPanel* panelp)
|
||||
{
|
||||
BOOST_FOREACH(LLLayoutPanel* lp, mPanels)
|
||||
for (LLLayoutPanel* lp : mPanels)
|
||||
{
|
||||
if (lp->mResizeBar == NULL)
|
||||
{
|
||||
|
|
@ -737,7 +739,7 @@ void LLLayoutStack::updateFractionalSizes()
|
|||
{
|
||||
F32 total_resizable_dim = 0.f;
|
||||
|
||||
BOOST_FOREACH(LLLayoutPanel* panelp, mPanels)
|
||||
for (LLLayoutPanel* panelp : mPanels)
|
||||
{
|
||||
if (panelp->mAutoResize)
|
||||
{
|
||||
|
|
@ -745,7 +747,7 @@ void LLLayoutStack::updateFractionalSizes()
|
|||
}
|
||||
}
|
||||
|
||||
BOOST_FOREACH(LLLayoutPanel* panelp, mPanels)
|
||||
for (LLLayoutPanel* panelp : mPanels)
|
||||
{
|
||||
if (panelp->mAutoResize)
|
||||
{
|
||||
|
|
@ -766,7 +768,7 @@ void LLLayoutStack::normalizeFractionalSizes()
|
|||
S32 num_auto_resize_panels = 0;
|
||||
F32 total_fractional_size = 0.f;
|
||||
|
||||
BOOST_FOREACH(LLLayoutPanel* panelp, mPanels)
|
||||
for (LLLayoutPanel* panelp : mPanels)
|
||||
{
|
||||
if (panelp->mAutoResize)
|
||||
{
|
||||
|
|
@ -777,7 +779,7 @@ void LLLayoutStack::normalizeFractionalSizes()
|
|||
|
||||
if (total_fractional_size == 0.f)
|
||||
{ // equal distribution
|
||||
BOOST_FOREACH(LLLayoutPanel* panelp, mPanels)
|
||||
for (LLLayoutPanel* panelp : mPanels)
|
||||
{
|
||||
if (panelp->mAutoResize)
|
||||
{
|
||||
|
|
@ -787,7 +789,7 @@ void LLLayoutStack::normalizeFractionalSizes()
|
|||
}
|
||||
else
|
||||
{ // renormalize
|
||||
BOOST_FOREACH(LLLayoutPanel* panelp, mPanels)
|
||||
for (LLLayoutPanel* panelp : mPanels)
|
||||
{
|
||||
if (panelp->mAutoResize)
|
||||
{
|
||||
|
|
@ -804,7 +806,7 @@ bool LLLayoutStack::animatePanels()
|
|||
//
|
||||
// animate visibility
|
||||
//
|
||||
BOOST_FOREACH(LLLayoutPanel* panelp, mPanels)
|
||||
for (LLLayoutPanel* panelp : mPanels)
|
||||
{
|
||||
if (panelp->getVisible())
|
||||
{
|
||||
|
|
@ -902,7 +904,7 @@ void LLLayoutStack::updatePanelRect( LLLayoutPanel* resized_panel, const LLRect&
|
|||
LLLayoutPanel* other_resize_panel = NULL;
|
||||
LLLayoutPanel* following_panel = NULL;
|
||||
|
||||
BOOST_REVERSE_FOREACH(LLLayoutPanel* panelp, mPanels)
|
||||
BOOST_REVERSE_FOREACH(LLLayoutPanel* panelp, mPanels) // Should replace this when C++20 reverse view adaptor becomes available...
|
||||
{
|
||||
if (panelp->mAutoResize)
|
||||
{
|
||||
|
|
@ -951,7 +953,7 @@ void LLLayoutStack::updatePanelRect( LLLayoutPanel* resized_panel, const LLRect&
|
|||
AFTER_RESIZED_PANEL
|
||||
} which_panel = BEFORE_RESIZED_PANEL;
|
||||
|
||||
BOOST_FOREACH(LLLayoutPanel* panelp, mPanels)
|
||||
for (LLLayoutPanel* panelp : mPanels)
|
||||
{
|
||||
if (!panelp->getVisible() || panelp->mCollapsed)
|
||||
{
|
||||
|
|
@ -1042,6 +1044,7 @@ void LLLayoutStack::updatePanelRect( LLLayoutPanel* resized_panel, const LLRect&
|
|||
MIN_FRACTIONAL_SIZE,
|
||||
MAX_FRACTIONAL_SIZE);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -1058,8 +1061,8 @@ void LLLayoutStack::reshape(S32 width, S32 height, BOOL called_from_parent)
|
|||
|
||||
void LLLayoutStack::updateResizeBarLimits()
|
||||
{
|
||||
LLLayoutPanel* previous_visible_panelp = NULL;
|
||||
BOOST_REVERSE_FOREACH(LLLayoutPanel* visible_panelp, mPanels)
|
||||
LLLayoutPanel* previous_visible_panelp{ nullptr };
|
||||
BOOST_REVERSE_FOREACH(LLLayoutPanel* visible_panelp, mPanels) // Should replace this when C++20 reverse view adaptor becomes available...
|
||||
{
|
||||
if (!visible_panelp->getVisible() || visible_panelp->mCollapsed)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@
|
|||
// Project includes
|
||||
#include "lluictrlfactory.h"
|
||||
#include "lluiimage.h"
|
||||
#include "boost/foreach.hpp"
|
||||
|
||||
// registered in llui.cpp to avoid being left out by MS linker
|
||||
//static LLDefaultChildRegistry::Register<LLLoadingIndicator> r("loading_indicator");
|
||||
|
|
@ -52,7 +51,7 @@ LLLoadingIndicator::LLLoadingIndicator(const Params& p)
|
|||
|
||||
void LLLoadingIndicator::initFromParams(const Params& p)
|
||||
{
|
||||
BOOST_FOREACH(LLUIImage* image, p.images().image)
|
||||
for (LLUIImage* image : p.images().image)
|
||||
{
|
||||
mImages.push_back(image);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@
|
|||
#include "v2math.h"
|
||||
#include <set>
|
||||
#include <boost/tokenizer.hpp>
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
#include "llclipboard.h" // <FS:ND/ To let someone copy a menus text + accelerator to clipboard
|
||||
// static
|
||||
|
|
@ -2188,7 +2187,7 @@ void LLMenuGL::arrange( void )
|
|||
}
|
||||
else
|
||||
{
|
||||
BOOST_FOREACH(LLMenuItemGL* itemp, mItems)
|
||||
for (LLMenuItemGL* itemp : mItems)
|
||||
{
|
||||
// do first so LLMenuGLItemCall can call on_visible to determine if visible
|
||||
itemp->buildDrawLabel();
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@
|
|||
|
||||
#include <algorithm>
|
||||
#include <boost/regex.hpp>
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
|
||||
const std::string NOTIFICATION_PERSIST_VERSION = "0.93";
|
||||
|
|
@ -446,14 +445,14 @@ LLNotificationTemplate::LLNotificationTemplate(const LLNotificationTemplate::Par
|
|||
mSoundName = p.sound;
|
||||
}
|
||||
|
||||
BOOST_FOREACH(const LLNotificationTemplate::UniquenessContext& context, p.unique.contexts)
|
||||
for (const LLNotificationTemplate::UniquenessContext& context : p.unique.contexts)
|
||||
{
|
||||
mUniqueContext.push_back(context.value);
|
||||
}
|
||||
|
||||
LL_DEBUGS("Notifications") << "notification \"" << mName << "\": tag count is " << p.tags.size() << LL_ENDL;
|
||||
|
||||
BOOST_FOREACH(const LLNotificationTemplate::Tag& tag, p.tags)
|
||||
for (const LLNotificationTemplate::Tag& tag : p.tags)
|
||||
{
|
||||
LL_DEBUGS("Notifications") << " tag \"" << std::string(tag.value) << "\"" << LL_ENDL;
|
||||
mTags.push_back(tag.value);
|
||||
|
|
@ -1003,6 +1002,7 @@ LLBoundListener LLNotificationChannelBase::connectChangedImpl(const LLEventListe
|
|||
// all of the notifications that are already in the channel
|
||||
// we use a special signal called "load" in case the channel wants to care
|
||||
// only about new notifications
|
||||
LLMutexLock lock(&mItemsMutex);
|
||||
for (LLNotificationSet::iterator it = mItems.begin(); it != mItems.end(); ++it)
|
||||
{
|
||||
slot(LLSD().with("sigtype", "load").with("id", (*it)->id()));
|
||||
|
|
@ -1162,7 +1162,7 @@ LLNotificationChannel::LLNotificationChannel(const Params& p)
|
|||
LLInstanceTracker<LLNotificationChannel, std::string>(p.name.isProvided() ? p.name : LLUUID::generateNewID().asString()),
|
||||
mName(p.name.isProvided() ? p.name : LLUUID::generateNewID().asString())
|
||||
{
|
||||
BOOST_FOREACH(const std::string& source, p.sources)
|
||||
for (const std::string& source : p.sources)
|
||||
{
|
||||
connectToChannel(source);
|
||||
}
|
||||
|
|
@ -1180,6 +1180,14 @@ LLNotificationChannel::LLNotificationChannel(const std::string& name,
|
|||
connectToChannel(parent);
|
||||
}
|
||||
|
||||
LLNotificationChannel::~LLNotificationChannel()
|
||||
{
|
||||
for (LLBoundListener &listener : mListeners)
|
||||
{
|
||||
listener.disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
bool LLNotificationChannel::isEmpty() const
|
||||
{
|
||||
return mItems.empty();
|
||||
|
|
@ -1187,17 +1195,7 @@ bool LLNotificationChannel::isEmpty() const
|
|||
|
||||
S32 LLNotificationChannel::size() const
|
||||
{
|
||||
return mItems.size();
|
||||
}
|
||||
|
||||
LLNotificationChannel::Iterator LLNotificationChannel::begin()
|
||||
{
|
||||
return mItems.begin();
|
||||
}
|
||||
|
||||
LLNotificationChannel::Iterator LLNotificationChannel::end()
|
||||
{
|
||||
return mItems.end();
|
||||
return mItems.size();
|
||||
}
|
||||
|
||||
size_t LLNotificationChannel::size()
|
||||
|
|
@ -1205,12 +1203,19 @@ size_t LLNotificationChannel::size()
|
|||
return mItems.size();
|
||||
}
|
||||
|
||||
void LLNotificationChannel::forEachNotification(NotificationProcess process)
|
||||
{
|
||||
LLMutexLock lock(&mItemsMutex);
|
||||
std::for_each(mItems.begin(), mItems.end(), process);
|
||||
}
|
||||
|
||||
std::string LLNotificationChannel::summarize()
|
||||
{
|
||||
std::string s("Channel '");
|
||||
s += mName;
|
||||
s += "'\n ";
|
||||
for (LLNotificationChannel::Iterator it = begin(); it != end(); ++it)
|
||||
LLMutexLock lock(&mItemsMutex);
|
||||
for (LLNotificationChannel::Iterator it = mItems.begin(); it != mItems.end(); ++it)
|
||||
{
|
||||
s += (*it)->summarize();
|
||||
s += "\n ";
|
||||
|
|
@ -1222,14 +1227,14 @@ void LLNotificationChannel::connectToChannel( const std::string& channel_name )
|
|||
{
|
||||
if (channel_name.empty())
|
||||
{
|
||||
LLNotifications::instance().connectChanged(
|
||||
boost::bind(&LLNotificationChannelBase::updateItem, this, _1));
|
||||
mListeners.push_back(LLNotifications::instance().connectChanged(
|
||||
boost::bind(&LLNotificationChannelBase::updateItem, this, _1)));
|
||||
}
|
||||
else
|
||||
{
|
||||
mParents.push_back(channel_name);
|
||||
LLNotificationChannelPtr p = LLNotifications::instance().getChannel(channel_name);
|
||||
p->connectChanged(boost::bind(&LLNotificationChannelBase::updateItem, this, _1));
|
||||
mListeners.push_back(p->connectChanged(boost::bind(&LLNotificationChannelBase::updateItem, this, _1)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1531,7 +1536,7 @@ void replaceFormText(LLNotificationForm::Params& form, const std::string& patter
|
|||
form.ignore.text = replace;
|
||||
}
|
||||
|
||||
BOOST_FOREACH(LLNotificationForm::FormElement& element, form.form_elements.elements)
|
||||
for (LLNotificationForm::FormElement& element : form.form_elements.elements)
|
||||
{
|
||||
if (element.button.isChosen() && element.button.text() == pattern)
|
||||
{
|
||||
|
|
@ -1586,19 +1591,19 @@ bool LLNotifications::loadTemplates()
|
|||
|
||||
mTemplates.clear();
|
||||
|
||||
BOOST_FOREACH(LLNotificationTemplate::GlobalString& string, params.strings)
|
||||
for (const LLNotificationTemplate::GlobalString& string : params.strings)
|
||||
{
|
||||
mGlobalStrings[string.name] = string.value;
|
||||
}
|
||||
|
||||
std::map<std::string, LLNotificationForm::Params> form_templates;
|
||||
|
||||
BOOST_FOREACH(LLNotificationTemplate::Template& notification_template, params.templates)
|
||||
for (const LLNotificationTemplate::Template& notification_template : params.templates)
|
||||
{
|
||||
form_templates[notification_template.name] = notification_template.form;
|
||||
}
|
||||
|
||||
BOOST_FOREACH(LLNotificationTemplate::Params& notification, params.notifications)
|
||||
for (LLNotificationTemplate::Params& notification : params.notifications)
|
||||
{
|
||||
if (notification.form_ref.form_template.isChosen())
|
||||
{
|
||||
|
|
@ -1653,7 +1658,7 @@ bool LLNotifications::loadVisibilityRules()
|
|||
|
||||
mVisibilityRules.clear();
|
||||
|
||||
BOOST_FOREACH(LLNotificationVisibilityRule::Rule& rule, params.rules)
|
||||
for (const LLNotificationVisibilityRule::Rule& rule : params.rules)
|
||||
{
|
||||
mVisibilityRules.push_back(LLNotificationVisibilityRulePtr(new LLNotificationVisibilityRule(rule)));
|
||||
}
|
||||
|
|
@ -1746,6 +1751,7 @@ void LLNotifications::cancel(LLNotificationPtr pNotif)
|
|||
|
||||
void LLNotifications::cancelByName(const std::string& name)
|
||||
{
|
||||
LLMutexLock lock(&mItemsMutex);
|
||||
std::vector<LLNotificationPtr> notifs_to_cancel;
|
||||
for (LLNotificationSet::iterator it=mItems.begin(), end_it = mItems.end();
|
||||
it != end_it;
|
||||
|
|
@ -1770,6 +1776,7 @@ void LLNotifications::cancelByName(const std::string& name)
|
|||
|
||||
void LLNotifications::cancelByOwner(const LLUUID ownerId)
|
||||
{
|
||||
LLMutexLock lock(&mItemsMutex);
|
||||
std::vector<LLNotificationPtr> notifs_to_cancel;
|
||||
for (LLNotificationSet::iterator it = mItems.begin(), end_it = mItems.end();
|
||||
it != end_it;
|
||||
|
|
@ -1817,11 +1824,6 @@ LLNotificationPtr LLNotifications::find(LLUUID uuid)
|
|||
}
|
||||
}
|
||||
|
||||
void LLNotifications::forEachNotification(NotificationProcess process)
|
||||
{
|
||||
std::for_each(mItems.begin(), mItems.end(), process);
|
||||
}
|
||||
|
||||
std::string LLNotifications::getGlobalString(const std::string& key) const
|
||||
{
|
||||
GlobalStringMap::const_iterator it = mGlobalStrings.find(key);
|
||||
|
|
|
|||
|
|
@ -745,16 +745,19 @@ class LLNotificationChannelBase :
|
|||
{
|
||||
LOG_CLASS(LLNotificationChannelBase);
|
||||
public:
|
||||
LLNotificationChannelBase(LLNotificationFilter filter)
|
||||
: mFilter(filter),
|
||||
mItems()
|
||||
{}
|
||||
LLNotificationChannelBase(LLNotificationFilter filter)
|
||||
: mFilter(filter)
|
||||
, mItems()
|
||||
, mItemsMutex()
|
||||
{}
|
||||
|
||||
virtual ~LLNotificationChannelBase()
|
||||
{
|
||||
// explicit cleanup for easier issue detection
|
||||
mChanged.disconnect_all_slots();
|
||||
mPassedFilter.disconnect_all_slots();
|
||||
mFailedFilter.disconnect_all_slots();
|
||||
LLMutexLock lock(&mItemsMutex);
|
||||
mItems.clear();
|
||||
}
|
||||
// you can also connect to a Channel, so you can be notified of
|
||||
|
|
@ -793,6 +796,7 @@ protected:
|
|||
LLStandardSignal mChanged;
|
||||
LLStandardSignal mPassedFilter;
|
||||
LLStandardSignal mFailedFilter;
|
||||
LLMutex mItemsMutex;
|
||||
|
||||
// these are action methods that subclasses can override to take action
|
||||
// on specific types of changes; the management of the mItems list is
|
||||
|
|
@ -842,7 +846,7 @@ public:
|
|||
LLNotificationChannel(const Params& p = Params());
|
||||
LLNotificationChannel(const std::string& name, const std::string& parent, LLNotificationFilter filter);
|
||||
|
||||
virtual ~LLNotificationChannel() {}
|
||||
virtual ~LLNotificationChannel();
|
||||
typedef LLNotificationSet::iterator Iterator;
|
||||
|
||||
std::string getName() const { return mName; }
|
||||
|
|
@ -851,21 +855,23 @@ public:
|
|||
{
|
||||
return boost::iterator_range<parents_iter>(mParents);
|
||||
}
|
||||
|
||||
void connectToChannel(const std::string& channel_name);
|
||||
|
||||
|
||||
bool isEmpty() const;
|
||||
S32 size() const;
|
||||
|
||||
Iterator begin();
|
||||
Iterator end();
|
||||
size_t size();
|
||||
|
||||
size_t size();
|
||||
|
||||
typedef boost::function<void(LLNotificationPtr)> NotificationProcess;
|
||||
void forEachNotification(NotificationProcess process);
|
||||
|
||||
std::string summarize();
|
||||
|
||||
protected:
|
||||
void connectToChannel(const std::string& channel_name);
|
||||
|
||||
private:
|
||||
std::string mName;
|
||||
std::vector<std::string> mParents;
|
||||
std::vector<LLBoundListener> mListeners;
|
||||
};
|
||||
|
||||
// An interface class to provide a clean linker seam to the LLNotifications class.
|
||||
|
|
@ -931,10 +937,6 @@ public:
|
|||
void update(const LLNotificationPtr pNotif);
|
||||
|
||||
LLNotificationPtr find(LLUUID uuid);
|
||||
|
||||
typedef boost::function<void (LLNotificationPtr)> NotificationProcess;
|
||||
|
||||
void forEachNotification(NotificationProcess process);
|
||||
|
||||
// This is all stuff for managing the templates
|
||||
// take your template out
|
||||
|
|
@ -998,7 +1000,7 @@ private:
|
|||
bool mIgnoreAllNotifications;
|
||||
|
||||
// <FS:Ansariel> Disable test API
|
||||
//boost::scoped_ptr<LLNotificationsListener> mListener;
|
||||
//std::unique_ptr<LLNotificationsListener> mListener;
|
||||
|
||||
std::vector<LLNotificationChannelPtr> mDefaultChannels;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@
|
|||
#include "llnotificationtemplate.h"
|
||||
#include "llsd.h"
|
||||
#include "llui.h"
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
LLNotificationsListener::LLNotificationsListener(LLNotifications & notifications) :
|
||||
LLEventAPI("LLNotifications",
|
||||
|
|
@ -149,11 +148,11 @@ void LLNotificationsListener::listChannelNotifications(const LLSD& params) const
|
|||
if (channel)
|
||||
{
|
||||
LLSD notifications(LLSD::emptyArray());
|
||||
for (LLNotificationChannel::Iterator ni(channel->begin()), nend(channel->end());
|
||||
ni != nend; ++ni)
|
||||
{
|
||||
notifications.append(asLLSD(*ni));
|
||||
}
|
||||
std::function<void(LLNotificationPtr)> func = [notifications](LLNotificationPtr ni) mutable
|
||||
{
|
||||
notifications.append(asLLSD(ni));
|
||||
};
|
||||
channel->forEachNotification(func);
|
||||
response["notifications"] = notifications;
|
||||
}
|
||||
LLEventPumps::instance().obtain(params["reply"]).post(response);
|
||||
|
|
|
|||
|
|
@ -104,6 +104,14 @@ LLSearchEditor::LLSearchEditor(const LLSearchEditor::Params& p)
|
|||
}
|
||||
}
|
||||
|
||||
LLSearchEditor::~LLSearchEditor()
|
||||
{
|
||||
mSearchButton = NULL;
|
||||
mClearButton = NULL;
|
||||
mSearchEditor->deleteAllChildren();
|
||||
deleteAllChildren();
|
||||
}
|
||||
|
||||
//virtual
|
||||
void LLSearchEditor::draw()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ protected:
|
|||
friend class LLUICtrlFactory;
|
||||
|
||||
public:
|
||||
virtual ~LLSearchEditor() {}
|
||||
virtual ~LLSearchEditor();
|
||||
|
||||
/*virtual*/ void draw();
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@
|
|||
|
||||
#include "linden_common.h"
|
||||
|
||||
#include <boost/foreach.hpp>
|
||||
#include "lltoolbar.h"
|
||||
|
||||
#include "llcommandmanager.h"
|
||||
|
|
@ -282,7 +281,7 @@ void LLToolBar::initFromParams(const LLToolBar::Params& p)
|
|||
mCenteringStack->addChild(mEndCenteringPanel);
|
||||
// </FS:Zi>
|
||||
|
||||
BOOST_FOREACH(LLCommandId id, p.commands)
|
||||
for (const auto& id : p.commands)
|
||||
{
|
||||
addCommand(id);
|
||||
}
|
||||
|
|
@ -480,7 +479,7 @@ BOOL LLToolBar::handleRightMouseDown(S32 x, S32 y, MASK mask)
|
|||
// Determine which button the mouse was over during the click in case the context menu action
|
||||
// is intended to affect the button.
|
||||
mRightMouseTargetButton = NULL;
|
||||
BOOST_FOREACH(LLToolBarButton* button, mButtons)
|
||||
for (LLToolBarButton* button : mButtons)
|
||||
{
|
||||
LLRect button_rect;
|
||||
button->localRectToOtherView(button->getLocalRect(), &button_rect, this);
|
||||
|
|
@ -580,7 +579,7 @@ void LLToolBar::setButtonType(LLToolBarEnums::ButtonType button_type)
|
|||
void LLToolBar::resizeButtonsInRow(std::vector<LLToolBarButton*>& buttons_in_row, S32 max_row_girth)
|
||||
{
|
||||
// make buttons in current row all same girth
|
||||
BOOST_FOREACH(LLToolBarButton* button, buttons_in_row)
|
||||
for (LLToolBarButton* button : buttons_in_row)
|
||||
{
|
||||
if (getOrientation(mSideType) == LLLayoutStack::HORIZONTAL)
|
||||
{
|
||||
|
|
@ -781,7 +780,7 @@ void LLToolBar::updateLayoutAsNeeded()
|
|||
}
|
||||
else if (mLayoutStyle == LAYOUT_STYLE_EQUALIZE)
|
||||
{
|
||||
BOOST_FOREACH(LLToolBarButton* button, mButtons)
|
||||
for (LLToolBarButton* button : mButtons)
|
||||
{
|
||||
S32 width = button->getInitialWidth();
|
||||
if (width > equalized_width)
|
||||
|
|
@ -799,7 +798,7 @@ void LLToolBar::updateLayoutAsNeeded()
|
|||
}
|
||||
// </FS:Zi>
|
||||
|
||||
BOOST_FOREACH(LLToolBarButton* button, mButtons)
|
||||
for (LLToolBarButton* button : mButtons)
|
||||
{
|
||||
// <FS:Zi> Add equalized and fill layout options
|
||||
// button->reshape(button->mWidthRange.getMin(), button->mDesiredHeight);
|
||||
|
|
@ -1054,7 +1053,7 @@ void LLToolBar::createButtons()
|
|||
{
|
||||
std::set<LLUUID> set_flashing;
|
||||
|
||||
BOOST_FOREACH(LLToolBarButton* button, mButtons)
|
||||
for (LLToolBarButton* button : mButtons)
|
||||
{
|
||||
if (button->getFlashTimer() && button->getFlashTimer()->isFlashingInProgress())
|
||||
{
|
||||
|
|
@ -1072,7 +1071,7 @@ void LLToolBar::createButtons()
|
|||
mButtonMap.clear();
|
||||
mRightMouseTargetButton = NULL;
|
||||
|
||||
BOOST_FOREACH(LLCommandId& command_id, mButtonCommands)
|
||||
for (const LLCommandId& command_id : mButtonCommands)
|
||||
{
|
||||
LLToolBarButton* button = createButton(command_id);
|
||||
mButtons.push_back(button);
|
||||
|
|
|
|||
|
|
@ -444,7 +444,13 @@ void LLToolTipMgr::createToolTip(const LLToolTip::Params& params)
|
|||
tooltip_params.rect = LLRect (0, 1, 1, 0);
|
||||
|
||||
if (tooltip_params.create_callback.isProvided())
|
||||
mToolTip = tooltip_params.create_callback()(tooltip_params);
|
||||
{
|
||||
mToolTip = tooltip_params.create_callback()(tooltip_params);
|
||||
if (mToolTip == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
mToolTip = LLUICtrlFactory::create<LLToolTip> (tooltip_params);
|
||||
|
||||
|
|
@ -496,7 +502,7 @@ void LLToolTipMgr::show(const LLToolTip::Params& params)
|
|||
{
|
||||
if (!params.styled_message.isProvided()
|
||||
&& (!params.message.isProvided() || params.message().empty())
|
||||
&& !params.image.isProvided()) return;
|
||||
&& !params.image.isProvided() && !params.create_callback.isProvided()) return;
|
||||
// fill in default tooltip params from tool_tip.xml
|
||||
LLToolTip::Params params_with_defaults(params);
|
||||
params_with_defaults.fillFrom(LLUICtrlFactory::instance().getDefaultParams<LLToolTip>());
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@
|
|||
#include "llui.h"
|
||||
#include "lluicolortable.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
LLUIColorTable::ColorParams::ColorParams()
|
||||
: value("value"),
|
||||
|
|
@ -234,7 +233,7 @@ bool LLUIColorTable::loadFromSettings()
|
|||
|
||||
// pass constraint=LLDir::ALL_SKINS because we want colors.xml from every
|
||||
// skin dir
|
||||
BOOST_FOREACH(std::string colors_path,
|
||||
for (const std::string& colors_path :
|
||||
gDirUtilp->findSkinnedFilenames(LLDir::SKINBASE, "colors.xml", LLDir::ALL_SKINS))
|
||||
{
|
||||
result |= loadFromFilename(colors_path, mLoadedColors);
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@
|
|||
|
||||
#include <sstream>
|
||||
#include <boost/tokenizer.hpp>
|
||||
#include <boost/foreach.hpp>
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
#include "llrender.h"
|
||||
|
|
@ -66,6 +65,7 @@ static const S32 LINE_HEIGHT = 15;
|
|||
S32 LLView::sDepth = 0;
|
||||
bool LLView::sDebugRects = false;
|
||||
bool LLView::sDebugUnicode = false;
|
||||
bool LLView::sDebugCamera = false;
|
||||
bool LLView::sIsRectDirty = false;
|
||||
LLRect LLView::sDirtyRect;
|
||||
bool LLView::sDebugRectsShowNames = true;
|
||||
|
|
@ -643,7 +643,7 @@ void LLView::deleteAllChildren()
|
|||
|
||||
void LLView::setAllChildrenEnabled(BOOL b)
|
||||
{
|
||||
BOOST_FOREACH(LLView* viewp, mChildList)
|
||||
for (LLView* viewp : mChildList)
|
||||
{
|
||||
viewp->setEnabled(b);
|
||||
}
|
||||
|
|
@ -672,7 +672,7 @@ void LLView::onVisibilityChange ( BOOL new_visibility )
|
|||
{
|
||||
BOOL old_visibility;
|
||||
BOOL log_visibility_change = LLViewerEventRecorder::instance().getLoggingStatus();
|
||||
BOOST_FOREACH(LLView* viewp, mChildList)
|
||||
for (LLView* viewp : mChildList)
|
||||
{
|
||||
if (!viewp)
|
||||
{
|
||||
|
|
@ -776,7 +776,7 @@ LLView* LLView::childrenHandleCharEvent(const std::string& desc, const METHOD& m
|
|||
{
|
||||
if ( getVisible() && getEnabled() )
|
||||
{
|
||||
BOOST_FOREACH(LLView* viewp, mChildList)
|
||||
for (LLView* viewp : mChildList)
|
||||
{
|
||||
if ((viewp->*method)(c, mask, TRUE))
|
||||
{
|
||||
|
|
@ -795,7 +795,7 @@ LLView* LLView::childrenHandleCharEvent(const std::string& desc, const METHOD& m
|
|||
template <typename METHOD, typename XDATA>
|
||||
LLView* LLView::childrenHandleMouseEvent(const METHOD& method, S32 x, S32 y, XDATA extra, bool allow_mouse_block)
|
||||
{
|
||||
BOOST_FOREACH(LLView* viewp, mChildList)
|
||||
for (LLView* viewp : mChildList)
|
||||
{
|
||||
S32 local_x = x - viewp->getRect().mLeft;
|
||||
S32 local_y = y - viewp->getRect().mBottom;
|
||||
|
|
@ -824,7 +824,7 @@ LLView* LLView::childrenHandleMouseEvent(const METHOD& method, S32 x, S32 y, XDA
|
|||
|
||||
LLView* LLView::childrenHandleToolTip(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
BOOST_FOREACH(LLView* viewp, mChildList)
|
||||
for (LLView* viewp : mChildList)
|
||||
{
|
||||
S32 local_x = x - viewp->getRect().mLeft;
|
||||
S32 local_y = y - viewp->getRect().mBottom;
|
||||
|
|
@ -856,7 +856,7 @@ LLView* LLView::childrenHandleDragAndDrop(S32 x, S32 y, MASK mask,
|
|||
// default to not accepting drag and drop, will be overridden by handler
|
||||
*accept = ACCEPT_NO;
|
||||
|
||||
BOOST_FOREACH(LLView* viewp, mChildList)
|
||||
for (LLView* viewp : mChildList)
|
||||
{
|
||||
S32 local_x = x - viewp->getRect().mLeft;
|
||||
S32 local_y = y - viewp->getRect().mBottom;
|
||||
|
|
@ -882,7 +882,7 @@ LLView* LLView::childrenHandleDragAndDrop(S32 x, S32 y, MASK mask,
|
|||
|
||||
LLView* LLView::childrenHandleHover(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
BOOST_FOREACH(LLView* viewp, mChildList)
|
||||
for (LLView* viewp : mChildList)
|
||||
{
|
||||
S32 local_x = x - viewp->getRect().mLeft;
|
||||
S32 local_y = y - viewp->getRect().mBottom;
|
||||
|
|
@ -910,7 +910,7 @@ LLView* LLView::childFromPoint(S32 x, S32 y, bool recur)
|
|||
if (!getVisible())
|
||||
return NULL;
|
||||
|
||||
BOOST_FOREACH(LLView* viewp, mChildList)
|
||||
for (LLView* viewp : mChildList)
|
||||
{
|
||||
S32 local_x = x - viewp->getRect().mLeft;
|
||||
S32 local_y = y - viewp->getRect().mBottom;
|
||||
|
|
@ -1480,7 +1480,7 @@ void LLView::reshape(S32 width, S32 height, BOOL called_from_parent)
|
|||
mRect.mTop = getRect().mBottom + height;
|
||||
|
||||
// move child views according to reshape flags
|
||||
BOOST_FOREACH(LLView* viewp, mChildList)
|
||||
for (LLView* viewp : mChildList)
|
||||
{
|
||||
if (viewp != NULL)
|
||||
{
|
||||
|
|
@ -1552,7 +1552,7 @@ LLRect LLView::calcBoundingRect()
|
|||
{
|
||||
LLRect local_bounding_rect = LLRect::null;
|
||||
|
||||
BOOST_FOREACH(LLView* childp, mChildList)
|
||||
for (LLView* childp : mChildList)
|
||||
{
|
||||
// ignore invisible and "top" children when calculating bounding rect
|
||||
// such as combobox popups
|
||||
|
|
@ -1715,7 +1715,7 @@ LLView* LLView::findChildView(const std::string& name, BOOL recurse) const
|
|||
LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
|
||||
|
||||
// Look for direct children *first*
|
||||
BOOST_FOREACH(LLView* childp, mChildList)
|
||||
for (LLView* childp : mChildList)
|
||||
{
|
||||
llassert(childp);
|
||||
if (childp->getName() == name)
|
||||
|
|
@ -1726,7 +1726,7 @@ LLView* LLView::findChildView(const std::string& name, BOOL recurse) const
|
|||
if (recurse)
|
||||
{
|
||||
// Look inside each child as well.
|
||||
BOOST_FOREACH(LLView* childp, mChildList)
|
||||
for (LLView* childp : mChildList)
|
||||
{
|
||||
llassert(childp);
|
||||
LLView* viewp = childp->findChildView(name, recurse);
|
||||
|
|
@ -2910,7 +2910,7 @@ S32 LLView::notifyParent(const LLSD& info)
|
|||
bool LLView::notifyChildren(const LLSD& info)
|
||||
{
|
||||
bool ret = false;
|
||||
BOOST_FOREACH(LLView* childp, mChildList)
|
||||
for (LLView* childp : mChildList)
|
||||
{
|
||||
ret = ret || childp->notifyChildren(info);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -672,6 +672,9 @@ public:
|
|||
// Show hexadecimal byte values of unicode symbols in a tooltip
|
||||
static bool sDebugUnicode;
|
||||
|
||||
// Show camera position and direction in Camera Controls floater
|
||||
static bool sDebugCamera;
|
||||
|
||||
static bool sIsRectDirty;
|
||||
static LLRect sDirtyRect;
|
||||
|
||||
|
|
|
|||
|
|
@ -65,13 +65,12 @@ HRESULT GetVideoMemoryViaWMI(WCHAR* strInputDeviceID, DWORD* pdwAdapterRam)
|
|||
{
|
||||
HRESULT hr;
|
||||
bool bGotMemory = false;
|
||||
HRESULT hrCoInitialize = S_OK;
|
||||
IWbemLocator* pIWbemLocator = nullptr;
|
||||
IWbemServices* pIWbemServices = nullptr;
|
||||
BSTR pNamespace = nullptr;
|
||||
|
||||
*pdwAdapterRam = 0;
|
||||
hrCoInitialize = CoInitialize( 0 );
|
||||
CoInitializeEx(0, COINIT_APARTMENTTHREADED);
|
||||
|
||||
hr = CoCreateInstance( CLSID_WbemLocator,
|
||||
nullptr,
|
||||
|
|
@ -208,8 +207,7 @@ HRESULT GetVideoMemoryViaWMI(WCHAR* strInputDeviceID, DWORD* pdwAdapterRam)
|
|||
|
||||
SAFE_RELEASE( pIWbemLocator );
|
||||
|
||||
if( SUCCEEDED( hrCoInitialize ) )
|
||||
CoUninitialize();
|
||||
CoUninitialize();
|
||||
|
||||
if( bGotMemory )
|
||||
return S_OK;
|
||||
|
|
@ -232,9 +230,8 @@ S32 LLDXHardware::getMBVideoMemoryViaWMI()
|
|||
std::string LLDXHardware::getDriverVersionWMI(EGPUVendor vendor)
|
||||
{
|
||||
std::string mDriverVersion;
|
||||
HRESULT hrCoInitialize = S_OK;
|
||||
HRESULT hres;
|
||||
hrCoInitialize = CoInitialize(0);
|
||||
CoInitializeEx(0, COINIT_APARTMENTTHREADED);
|
||||
IWbemLocator *pLoc = NULL;
|
||||
|
||||
hres = CoCreateInstance(
|
||||
|
|
@ -437,10 +434,10 @@ std::string LLDXHardware::getDriverVersionWMI(EGPUVendor vendor)
|
|||
{
|
||||
pEnumerator->Release();
|
||||
}
|
||||
if (SUCCEEDED(hrCoInitialize))
|
||||
{
|
||||
CoUninitialize();
|
||||
}
|
||||
|
||||
// supposed to always call CoUninitialize even if init returned false
|
||||
CoUninitialize();
|
||||
|
||||
return mDriverVersion;
|
||||
}
|
||||
|
||||
|
|
@ -690,7 +687,8 @@ BOOL LLDXHardware::getInfo(BOOL vram_only, bool disable_wmi)
|
|||
BOOL ok = FALSE;
|
||||
HRESULT hr;
|
||||
|
||||
CoInitialize(NULL);
|
||||
// CLSID_DxDiagProvider does not work with Multithreaded?
|
||||
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
|
||||
IDxDiagProvider *dx_diag_providerp = NULL;
|
||||
IDxDiagContainer *dx_diag_rootp = NULL;
|
||||
|
|
@ -986,7 +984,7 @@ LLSD LLDXHardware::getDisplayInfo()
|
|||
LLTimer hw_timer;
|
||||
HRESULT hr;
|
||||
LLSD ret;
|
||||
CoInitialize(NULL);
|
||||
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
|
||||
IDxDiagProvider *dx_diag_providerp = NULL;
|
||||
IDxDiagContainer *dx_diag_rootp = NULL;
|
||||
|
|
|
|||
|
|
@ -151,6 +151,7 @@ set(viewer_SOURCE_FILES
|
|||
fsnearbychatvoicemonitor.cpp
|
||||
fspanelblocklist.cpp
|
||||
fspanelcontactsets.cpp
|
||||
fspanelface.cpp
|
||||
fspanelimcontrolpanel.cpp
|
||||
fspanellogin.cpp
|
||||
fspanelprefs.cpp
|
||||
|
|
@ -343,6 +344,7 @@ set(viewer_SOURCE_FILES
|
|||
llfloaterimcontainer.cpp
|
||||
llfloaterinspect.cpp
|
||||
llfloaterinventorysettings.cpp
|
||||
llfloaterinventorythumbnailshelper.cpp
|
||||
llfloaterjoystick.cpp
|
||||
llfloaterlagmeter.cpp
|
||||
llfloaterland.cpp
|
||||
|
|
@ -942,6 +944,7 @@ set(viewer_HEADER_FILES
|
|||
fsnearbychatvoicemonitor.h
|
||||
fspanelblocklist.h
|
||||
fspanelcontactsets.h
|
||||
fspanelface.h
|
||||
fspanelimcontrolpanel.h
|
||||
fspanellogin.h
|
||||
fspanelprefs.h
|
||||
|
|
@ -1139,6 +1142,7 @@ set(viewer_HEADER_FILES
|
|||
llfloaterimcontainer.h
|
||||
llfloaterinspect.h
|
||||
llfloaterinventorysettings.h
|
||||
llfloaterinventorythumbnailshelper.h
|
||||
llfloaterjoystick.h
|
||||
llfloaterlagmeter.h
|
||||
llfloaterland.h
|
||||
|
|
@ -1977,50 +1981,14 @@ endif (WINDOWS)
|
|||
|
||||
# Add the xui files. This is handy for searching for xui elements
|
||||
# from within the IDE.
|
||||
# <FS:Ansariel> Make all XUI files accessible in Visual Studio
|
||||
#set(viewer_XUI_FILES
|
||||
# skins/default/colors.xml
|
||||
# skins/default/default_languages.xml
|
||||
# skins/default/textures/textures.xml
|
||||
# )
|
||||
#file(GLOB DEFAULT_XUI_FILE_GLOB_LIST
|
||||
# ${CMAKE_CURRENT_SOURCE_DIR}/skins/*/xui/en/*.xml)
|
||||
#list(APPEND viewer_XUI_FILES ${DEFAULT_XUI_FILE_GLOB_LIST})
|
||||
|
||||
#file(GLOB DEFAULT_WIDGET_FILE_GLOB_LIST
|
||||
# ${CMAKE_CURRENT_SOURCE_DIR}/skins/*/xui/en/widgets/*.xml)
|
||||
#list(APPEND viewer_XUI_FILES ${DEFAULT_WIDGET_FILE_GLOB_LIST})
|
||||
|
||||
## Cannot append empty lists in CMake, wait until we have files here.
|
||||
##file(GLOB SILVER_WIDGET_FILE_GLOB_LIST
|
||||
## ${CMAKE_CURRENT_SOURCE_DIR}/skins/silver/xui/en-us/widgets/*.xml)
|
||||
##list(APPEND viewer_XUI_FILES ${SILVER_WIDGET_FILE_GLOB_LIST})
|
||||
|
||||
#list(SORT viewer_XUI_FILES)
|
||||
|
||||
#source_group("XUI Files" FILES ${viewer_XUI_FILES})
|
||||
|
||||
#set_source_files_properties(${viewer_XUI_FILES}
|
||||
# PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
|
||||
#list(APPEND viewer_SOURCE_FILES ${viewer_XUI_FILES})
|
||||
|
||||
file(GLOB_RECURSE viewer_XUI_FILES LIST_DIRECTORIES FALSE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/skins/*.xml)
|
||||
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/skins PREFIX "XUI Files" FILES ${viewer_XUI_FILES})
|
||||
set_source_files_properties(${viewer_XUI_FILES}
|
||||
PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
list(APPEND viewer_SOURCE_FILES ${viewer_XUI_FILES})
|
||||
# </FS:Ansariel>
|
||||
|
||||
file(GLOB_RECURSE viewer_SHADER_FILES LIST_DIRECTORIES FALSE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/app_settings/shaders/*.glsl)
|
||||
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/app_settings/shaders PREFIX "Shaders" FILES ${viewer_SHADER_FILES})
|
||||
set_source_files_properties(${viewer_SHADER_FILES}
|
||||
PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
list(APPEND viewer_SOURCE_FILES ${viewer_SHADER_FILES})
|
||||
|
||||
|
||||
# Add the shader sources
|
||||
file(GLOB_RECURSE viewer_SHADER_FILES LIST_DIRECTORIES FALSE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/app_settings/shaders/*.glsl)
|
||||
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/app_settings/shaders PREFIX "Shaders" FILES ${viewer_SHADER_FILES})
|
||||
|
|
@ -2294,7 +2262,7 @@ if (WINDOWS)
|
|||
|
||||
if (PACKAGE)
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/event_host.tar.bz2
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/event_host.tar.xz
|
||||
COMMAND ${PYTHON_EXECUTABLE}
|
||||
ARGS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/event_host_manifest.py
|
||||
|
|
@ -2339,7 +2307,7 @@ if (WINDOWS)
|
|||
)
|
||||
# temporarily disable packaging of event_host until hg subrepos get
|
||||
# sorted out on the parabuild cluster...
|
||||
#${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/event_host.tar.bz2)
|
||||
#${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/event_host.tar.xz)
|
||||
|
||||
endif (PACKAGE)
|
||||
elseif (DARWIN)
|
||||
|
|
@ -2491,7 +2459,7 @@ if (LINUX)
|
|||
add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_gstreamer10 media_plugin_cef linux-crash-logger)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${product}.tar.bz2
|
||||
OUTPUT ${product}.tar.xz
|
||||
COMMAND ${PYTHON_EXECUTABLE}
|
||||
ARGS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
|
||||
|
|
@ -2544,7 +2512,7 @@ if (LINUX)
|
|||
add_custom_target(copy_l_viewer_manifest ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.copy_touched)
|
||||
|
||||
if (PACKAGE)
|
||||
add_custom_target(llpackage ALL DEPENDS ${product}.tar.bz2)
|
||||
add_custom_target(llpackage ALL DEPENDS ${product}.tar.xz)
|
||||
# Make sure we don't run two instances of viewer_manifest.py at the same time.
|
||||
add_dependencies(llpackage copy_l_viewer_manifest)
|
||||
check_message_template(llpackage)
|
||||
|
|
@ -2693,7 +2661,7 @@ if (PACKAGE AND (RELEASE_CRASH_REPORTING OR NON_RELEASE_CRASH_REPORTING) AND VIE
|
|||
# OUTPUT_VARIABLE PARENT_DIRECTORY_CYGWIN
|
||||
# OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
# add_custom_command(OUTPUT "${VIEWER_SYMBOL_FILE}"
|
||||
# # Use of 'tar ...j' here assumes VIEWER_SYMBOL_FILE endswith .tar.bz2;
|
||||
# # Use of 'tar ...j' here assumes VIEWER_SYMBOL_FILE endswith .tar.xz;
|
||||
# # testing a string suffix is painful enough in CMake language that
|
||||
# # we'll continue assuming it until forced to generalize.
|
||||
# COMMAND "tar"
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
7.1.6
|
||||
7.1.7
|
||||
|
|
|
|||
|
|
@ -19,29 +19,55 @@
|
|||
<string>RenderAvatarMaxComplexity</string>
|
||||
<string>RenderAvatarMaxNonImpostors</string>
|
||||
<string>RenderAvatarPhysicsLODFactor</string>
|
||||
<string>RenderCloudShadowAmbianceFactor</string>
|
||||
<string>RenderCompressTextures</string>
|
||||
<string>RenderDeferredSSAO</string>
|
||||
<string>RenderDepthOfField</string>
|
||||
<string>RenderDepthOfFieldInEditMode</string>
|
||||
<string>RenderDisablePostProcessing</string>
|
||||
<string>RenderPostProcessingHDR</string>
|
||||
<string>RenderDefaultProbeUpdatePeriod</string>
|
||||
<string>RenderDynamicExposureCoefficient</string>
|
||||
<string>RenderExposure</string>
|
||||
<string>RenderFarClip</string>
|
||||
<string>RenderFlexTimeFactor</string>
|
||||
<string>RenderFSAASamples</string>
|
||||
<string>RenderGlow</string>
|
||||
<string>RenderGlowHDR</string>
|
||||
<string>RenderGlowIterations</string>
|
||||
<string>RenderGlowNoise</string>
|
||||
<string>RenderGlowResolutionPow</string>
|
||||
<string>RenderLocalLightCount</string>
|
||||
<string>RenderMaxPartCount</string>
|
||||
<string>RenderMaxVRAMBudget</string>
|
||||
<string>RenderQualityPerformance</string>
|
||||
<string>RenderReflectionsEnabled</string>
|
||||
<string>RenderReflectionProbeAmbiance</string>
|
||||
<string>RenderReflectionProbeDetail</string>
|
||||
<string>RenderReflectionProbeDrawDistance</string>
|
||||
<string>RenderReflectionProbeLevel</string>
|
||||
<string>RenderReflectionProbeMaxLocalLightAmbiance</string>
|
||||
<string>RenderReflectionProbeResolution</string>
|
||||
<string>RenderReflectionProbeVolumes</string>
|
||||
<string>RenderScreenSpaceReflections</string>
|
||||
<string>RenderScreenSpaceReflectionIterations</string>
|
||||
<string>RenderScreenSpaceReflectionRayStep</string>
|
||||
<string>RenderScreenSpaceReflectionDistanceBias</string>
|
||||
<string>RenderScreenSpaceReflectionDepthRejectBias</string>
|
||||
<string>RenderScreenSpaceReflectionAdaptiveStepMultiplier</string>
|
||||
<string>RenderScreenSpaceReflectionGlossySamples</string>
|
||||
<string>RenderShaderLightingMaxLevel</string>
|
||||
<string>RenderShadowDetail</string>
|
||||
<string>RenderShadowResolutionScale</string>
|
||||
<string>RenderSkyAmbientScale</string>
|
||||
<string>RenderSkyAutoAdjustAmbientScale</string>
|
||||
<string>RenderSkyAutoAdjustBlueDensityScale</string>
|
||||
<string>RenderSkyAutoAdjustBlueHorizonScale</string>
|
||||
<string>RenderSkyAutoAdjustSunColorScale</string>
|
||||
<string>RenderSkyAutoAdjustHDRScale</string>
|
||||
<string>RenderSkyAutoAdjustLegacy</string>
|
||||
<string>RenderSkyAutoAdjustProbeAmbiance</string>
|
||||
<string>RenderSkySunlightScale</string>
|
||||
<string>RenderSSAOIrradianceScale</string>
|
||||
<string>RenderSSAOIrradianceMax</string>
|
||||
<string>RenderSunDynamicRange</string>
|
||||
|
|
|
|||
|
|
@ -12457,7 +12457,7 @@ Change of this parameter will affect the layout of buttons in notification toast
|
|||
<key>Value</key>
|
||||
<real>1.0</real>
|
||||
</map>
|
||||
<key>RendeSkyAutoAdjustBlueHorizonScale</key>
|
||||
<key>RenderSkyAutoAdjustBlueHorizonScale</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Blue Horizon Scale value to use when auto-adjusting legacy skies</string>
|
||||
|
|
@ -12468,7 +12468,7 @@ Change of this parameter will affect the layout of buttons in notification toast
|
|||
<key>Value</key>
|
||||
<real>1.0</real>
|
||||
</map>
|
||||
<key>RendeSkyAutoAdjustBlueDensityScale</key>
|
||||
<key>RenderSkyAutoAdjustBlueDensityScale</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Blue Horizon Scale value to use when auto-adjusting legacy skies</string>
|
||||
|
|
@ -16580,6 +16580,21 @@ Change of this parameter will affect the layout of buttons in notification toast
|
|||
<key>Backup</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>FSShowSelectedInBlinnPhong</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Show BlinnPhong while selected (non-persistent).This setting is driven by the code, not by user</string>
|
||||
<key>Persist</key>
|
||||
<integer>0</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
<key>Backup</key>
|
||||
<integer>0</integer>
|
||||
<key>HideFromEditor</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>ShowSpecificLODInEdit</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
@ -25045,5 +25060,57 @@ Change of this parameter will affect the layout of buttons in notification toast
|
|||
<key>Value</key>
|
||||
<integer>128578</integer>
|
||||
</map>
|
||||
</map>
|
||||
<key>FSUseNewTexturePanel</key>
|
||||
<map>
|
||||
<key>Backup</key>
|
||||
<boolean>1</boolean>
|
||||
<key>Comment</key>
|
||||
<string>Use the new Texture/Material editor panel in build mode</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<boolean>1</boolean>
|
||||
</map>
|
||||
<key>FSInternalCanEditObjectFaces</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Internal control to show/hide object texture/material edit controls</string>
|
||||
<key>HideFromEditor</key>
|
||||
<integer>1</integer>
|
||||
<key>Persist</key>
|
||||
<integer>0</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>FSInternalFaceHasBPNormalMap</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Internal control to store a flag about the edited face having a Blinn-Phong normal map or not</string>
|
||||
<key>HideFromEditor</key>
|
||||
<integer>1</integer>
|
||||
<key>Persist</key>
|
||||
<integer>0</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>FSInternalFaceHasBPSpecularMap</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Internal control to store a flag about the edited face having a Blinn-Phong specular map or not</string>
|
||||
<key>HideFromEditor</key>
|
||||
<integer>1</integer>
|
||||
<key>Persist</key>
|
||||
<integer>0</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
</map>
|
||||
</llsd>
|
||||
|
|
|
|||
|
|
@ -2023,7 +2023,7 @@
|
|||
value_min="-1"
|
||||
value_max="1">
|
||||
<param_skeleton>
|
||||
|
||||
|
||||
<bone
|
||||
name="mEyeLeft"
|
||||
scale="0 0 0"
|
||||
|
|
@ -2033,8 +2033,9 @@
|
|||
name="mEyeRight"
|
||||
scale="0 0 0"
|
||||
offset="-.005 0 0" />
|
||||
|
||||
<bone
|
||||
|
||||
|
||||
<bone
|
||||
name="mFaceEyeAltLeft"
|
||||
scale="0 0 0"
|
||||
offset="-.005 0 0" />
|
||||
|
|
@ -2043,7 +2044,7 @@
|
|||
name="mFaceEyeAltRight"
|
||||
scale="0 0 0"
|
||||
offset="-.005 0 0" />
|
||||
|
||||
|
||||
<bone
|
||||
name="mFaceEyeLidLowerRight"
|
||||
scale="0 0.3 0.7"
|
||||
|
|
@ -2054,7 +2055,7 @@
|
|||
scale="0 0.3 0.7"
|
||||
offset="0 0 0" />
|
||||
|
||||
<bone
|
||||
<bone
|
||||
name="mFaceEyeLidUpperRight"
|
||||
scale="0 0.3 0.7"
|
||||
offset=" 0 0 0" />
|
||||
|
|
@ -2063,17 +2064,17 @@
|
|||
name="mFaceEyeLidUpperLeft"
|
||||
scale="0 0.3 0.7"
|
||||
offset=" 0 0 0" />
|
||||
|
||||
|
||||
<bone
|
||||
name="mFaceEyecornerInnerLeft"
|
||||
scale="0 0 0"
|
||||
offset="-0.005 -0.008 0.0" />
|
||||
|
||||
|
||||
<bone
|
||||
name="mFaceEyecornerInnerRight"
|
||||
scale="0 0 0"
|
||||
offset="-0.005 0.008 0.0" />
|
||||
|
||||
|
||||
</param_skeleton>
|
||||
</param>
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,806 @@
|
|||
/**
|
||||
* @file fspanelface.h
|
||||
* @brief Consolidated materials/texture panel in the tools floater
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
* Copyright (C) 2024, Zi Ree@Second Life
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#ifndef FS_FSPANELFACE_H
|
||||
#define FS_FSPANELFACE_H
|
||||
|
||||
#include "v4color.h"
|
||||
#include "llpanel.h"
|
||||
#include "llgltfmaterial.h"
|
||||
#include "llmaterial.h"
|
||||
#include "llmaterialmgr.h"
|
||||
#include "lltextureentry.h"
|
||||
#include "llselectmgr.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
class LLButton;
|
||||
class LLCheckBoxCtrl;
|
||||
class LLColorSwatchCtrl;
|
||||
class LLComboBox;
|
||||
class LLInventoryItem;
|
||||
class LLLineEditor;
|
||||
class LLRadioGroup;
|
||||
class LLSpinCtrl;
|
||||
class LLTextBox;
|
||||
class LLTextureCtrl;
|
||||
class LLUICtrl;
|
||||
class LLViewerObject;
|
||||
class LLFloater;
|
||||
class LLMaterialID;
|
||||
class LLMediaCtrl;
|
||||
class LLMenuButton;
|
||||
|
||||
class PBRPickerAgentListener;
|
||||
class PBRPickerObjectListener;
|
||||
|
||||
class LLTabContainer;
|
||||
|
||||
// Represents an edit for use in replicating the op across one or more materials in the selection set.
|
||||
//
|
||||
// The apply function optionally performs the edit which it implements
|
||||
// as a functor taking Data that calls member func MaterialFunc taking SetValueType
|
||||
// on an instance of the LLMaterial class.
|
||||
//
|
||||
// boost who?
|
||||
//
|
||||
template<
|
||||
typename DataType,
|
||||
typename SetValueType,
|
||||
void (LLMaterial::*MaterialEditFunc)(SetValueType data) >
|
||||
class FSMaterialEditFunctor
|
||||
{
|
||||
public:
|
||||
FSMaterialEditFunctor(const DataType& data) : _data(data) {}
|
||||
virtual ~FSMaterialEditFunctor() {}
|
||||
virtual void apply(LLMaterialPtr& material) { (material->*(MaterialEditFunc))(_data); }
|
||||
DataType _data;
|
||||
};
|
||||
|
||||
template<
|
||||
typename DataType,
|
||||
DataType (LLMaterial::*MaterialGetFunc)() >
|
||||
class FSMaterialGetFunctor
|
||||
{
|
||||
public:
|
||||
FSMaterialGetFunctor() {}
|
||||
virtual DataType get(LLMaterialPtr& material) { return (material->*(MaterialGetFunc)); }
|
||||
};
|
||||
|
||||
template<
|
||||
typename DataType,
|
||||
DataType (LLTextureEntry::*TEGetFunc)() >
|
||||
class FSTEGetFunctor
|
||||
{
|
||||
public:
|
||||
FSTEGetFunctor() {}
|
||||
virtual DataType get(LLTextureEntry* entry) { return (entry*(TEGetFunc)); }
|
||||
};
|
||||
|
||||
//
|
||||
// main class
|
||||
//
|
||||
|
||||
class FSPanelFace : public LLPanel
|
||||
{
|
||||
public:
|
||||
FSPanelFace();
|
||||
virtual ~FSPanelFace();
|
||||
|
||||
virtual BOOL postBuild();
|
||||
|
||||
void refresh();
|
||||
void refreshMedia();
|
||||
void unloadMedia();
|
||||
void changePrecision(S32 decimal_precision); // <FS:CR> Adjustable decimal precision
|
||||
|
||||
static void onMaterialOverrideReceived(const LLUUID& object_id, S32 side);
|
||||
|
||||
/*virtual*/ void onVisibilityChange(BOOL new_visibility);
|
||||
/*virtual*/ void draw();
|
||||
|
||||
LLMaterialPtr createDefaultMaterial(LLMaterialPtr current_material);
|
||||
|
||||
LLRender::eTexIndex getTextureChannelToEdit();
|
||||
LLRender::eTexIndex getTextureDropChannel();
|
||||
|
||||
LLGLTFMaterial::TextureInfo getPBRDropChannel();
|
||||
|
||||
protected:
|
||||
void navigateToTitleMedia(const std::string url);
|
||||
bool selectedMediaEditable();
|
||||
void clearMediaSettings();
|
||||
void updateMediaSettings();
|
||||
void updateMediaTitle();
|
||||
|
||||
void getState();
|
||||
|
||||
void sendTexture(); // applies and sends texture
|
||||
void sendTextureInfo(); // applies and sends texture scale, offset, etc.
|
||||
void sendColor(); // applies and sends color
|
||||
void sendAlpha(); // applies and sends transparency
|
||||
void sendBump(U32 bumpiness); // applies and sends bump map
|
||||
void sendTexGen(); // applies and sends bump map
|
||||
void sendShiny(U32 shininess); // applies and sends shininess
|
||||
void sendFullbright(); // applies and sends full bright
|
||||
void sendGlow();
|
||||
void alignTextureLayer();
|
||||
|
||||
void updateCopyTexButton();
|
||||
|
||||
//
|
||||
// UI Callbacks
|
||||
//
|
||||
|
||||
// common controls and parameters for Blinn-Phong and PBR
|
||||
void onCopyFaces(); // <FS> Extended copy & paste buttons
|
||||
void onPasteFaces();
|
||||
void onCommitGlow();
|
||||
void onCommitRepeatsPerMeter();
|
||||
|
||||
// Blinn-Phong alpha parameters
|
||||
void onCommitAlpha();
|
||||
void onCommitAlphaMode();
|
||||
void onCommitMaterialMaskCutoff();
|
||||
void onCommitFullbright();
|
||||
|
||||
// Blinn-Phong texture transforms and controls
|
||||
void onCommitTexGen();
|
||||
void onCommitPlanarAlign();
|
||||
void onCommitBump();
|
||||
void onCommitShiny();
|
||||
void onCommitTextureScaleX();
|
||||
void onCommitTextureScaleY();
|
||||
void onCommitTextureOffsetX();
|
||||
void onCommitTextureOffsetY();
|
||||
void onCommitTextureRot();
|
||||
void onCommitMaterialBumpyScaleX();
|
||||
void onCommitMaterialBumpyScaleY();
|
||||
void onCommitMaterialBumpyOffsetX();
|
||||
void onCommitMaterialBumpyOffsetY();
|
||||
void onCommitMaterialBumpyRot();
|
||||
void onCommitMaterialShinyScaleX();
|
||||
void onCommitMaterialShinyScaleY();
|
||||
void onCommitMaterialShinyOffsetX();
|
||||
void onCommitMaterialShinyOffsetY();
|
||||
void onCommitMaterialShinyRot();
|
||||
void onCommitMaterialGloss();
|
||||
void onCommitMaterialEnv();
|
||||
|
||||
// Blinn-Phong Diffuse tint color swatch
|
||||
void onCommitColor();
|
||||
void onCancelColor();
|
||||
void onSelectColor();
|
||||
|
||||
// Blinn-Phong Diffuse texture swatch
|
||||
void onCommitTexture(const LLUICtrl* ctrl, const LLSD& data);
|
||||
void onCancelTexture();
|
||||
BOOL onDragTexture(LLInventoryItem* item); // this function is to return TRUE if the drag should succeed.
|
||||
void onCloseTexturePicker(const LLSD& data);
|
||||
|
||||
// Blinn-Phong Normal texture swatch
|
||||
void onCommitNormalTexture(const LLUICtrl* ctrl, const LLSD& data);
|
||||
void onCancelNormalTexture();
|
||||
|
||||
// Blinn-Phong Specular texture swatch
|
||||
void onCommitSpecularTexture(const LLUICtrl* ctrl, const LLSD& data);
|
||||
void onCancelSpecularTexture();
|
||||
|
||||
// Blinn-Phong Specular tint color swatch
|
||||
void onCommitShinyColor();
|
||||
void onCancelShinyColor();
|
||||
void onSelectShinyColor();
|
||||
|
||||
// Texture alignment and maps synchronization
|
||||
void onClickAutoFix();
|
||||
void onAlignTexture();
|
||||
void onClickMapsSync();
|
||||
|
||||
/*
|
||||
* Checks whether the selected texture from the LLFloaterTexturePicker can be applied to the currently selected object.
|
||||
* If agent selects texture which is not allowed to be applied for the currently selected object,
|
||||
* all controls of the floater texture picker which allow to apply the texture will be disabled.
|
||||
*/
|
||||
void onTextureSelectionChanged(const std::string& which_control);
|
||||
|
||||
// Media
|
||||
void onClickBtnEditMedia();
|
||||
void onClickBtnDeleteMedia();
|
||||
void onClickBtnAddMedia();
|
||||
|
||||
void alignMaterialsProperties();
|
||||
|
||||
//
|
||||
// PBR
|
||||
//
|
||||
|
||||
// PBR Material
|
||||
void onCommitPbr();
|
||||
void onCancelPbr();
|
||||
void onSelectPbr();
|
||||
BOOL onDragPbr(LLInventoryItem* item); // this function is to return TRUE if the drag should succeed.
|
||||
|
||||
void onPbrSelectionChanged(LLInventoryItem* itemp);
|
||||
void onClickBtnSavePBR();
|
||||
|
||||
void updatePBROverrideDisplay();
|
||||
|
||||
// PBR texture maps
|
||||
void onCommitPbr(const LLUICtrl* pbr_ctrl);
|
||||
void onCancelPbr(const LLUICtrl* pbr_ctrl);
|
||||
void onSelectPbr(const LLUICtrl* pbr_ctrl);
|
||||
|
||||
void getGLTFMaterial(LLGLTFMaterial* mat);
|
||||
|
||||
//
|
||||
// other
|
||||
//
|
||||
|
||||
bool deleteMediaConfirm(const LLSD& notification, const LLSD& response);
|
||||
bool multipleFacesSelectedConfirm(const LLSD& notification, const LLSD& response);
|
||||
|
||||
// Make UI reflect state of currently selected material (refresh)
|
||||
// and UI mode (e.g. editing normal map v diffuse map)
|
||||
//
|
||||
// @param force_set_values forces spinners to set value even if they are focused
|
||||
void updateUI(bool force_set_values = false);
|
||||
|
||||
// Convenience func to determine if all faces in selection have
|
||||
// identical planar texgen settings during edits
|
||||
//
|
||||
bool isIdenticalPlanarTexgen();
|
||||
|
||||
// Callback funcs for individual controls
|
||||
//
|
||||
static void syncRepeatX(FSPanelFace* self, F32 scaleU);
|
||||
static void syncRepeatY(FSPanelFace* self, F32 scaleV);
|
||||
static void syncOffsetX(FSPanelFace* self, F32 offsetU);
|
||||
static void syncOffsetY(FSPanelFace* self, F32 offsetV);
|
||||
static void syncMaterialRot(FSPanelFace* self, F32 rot, int te = -1);
|
||||
|
||||
// unify all GLTF spinners with no switching around required -Zi
|
||||
void onCommitGLTFUVSpinner(const LLUICtrl* ctrl, const LLSD& user_data);
|
||||
|
||||
void onClickBtnSelectSameTexture(const LLUICtrl* ctrl, const LLSD& user_data); // Find all faces with same texture
|
||||
void onShowFindAllButton(LLUICtrl* ctrl, const LLSD& user_data); // Find all faces with same texture
|
||||
void onHideFindAllButton(LLUICtrl* ctrl, const LLSD& user_data); // Find all faces with same texture
|
||||
|
||||
public: // needs to be accessible to selection manager
|
||||
void onCopyColor(); // records all selected faces
|
||||
void onPasteColor(); // to specific face
|
||||
void onPasteColor(LLViewerObject* objectp, S32 te); // to specific face
|
||||
void onCopyTexture();
|
||||
void onPasteTexture();
|
||||
void onPasteTexture(LLViewerObject* objectp, S32 te);
|
||||
|
||||
protected:
|
||||
//
|
||||
// Constant definitions for tabs and combo boxes
|
||||
// Must match the commbobox definitions in panel_tools_texture.xml // Not anymore -Zi
|
||||
//
|
||||
static constexpr S32 MATMEDIA_MATERIAL = 0; // Material
|
||||
static constexpr S32 MATMEDIA_PBR = 1; // PBR
|
||||
static constexpr S32 MATMEDIA_MEDIA = 2; // Media
|
||||
|
||||
static constexpr S32 MATTYPE_DIFFUSE = 0; // Diffuse material texture
|
||||
static constexpr S32 MATTYPE_NORMAL = 1; // Normal map
|
||||
static constexpr S32 MATTYPE_SPECULAR = 2; // Specular map
|
||||
|
||||
static constexpr S32 BUMPY_TEXTURE = 18; // use supplied normal map (index of "Use Texture" in combo box)
|
||||
static constexpr S32 SHINY_TEXTURE = 4; // use supplied specular map (index of "Use Texture" in combo box)
|
||||
|
||||
static constexpr S32 PBRTYPE_RENDER_MATERIAL_ID = 0; // Render Material ID
|
||||
static constexpr S32 PBRTYPE_BASE_COLOR = 1; // PBR Base Color
|
||||
static constexpr S32 PBRTYPE_METALLIC_ROUGHNESS = 2; // PBR Metallic
|
||||
static constexpr S32 PBRTYPE_EMISSIVE = 3; // PBR Emissive
|
||||
static constexpr S32 PBRTYPE_NORMAL = 4; // PBR Normal
|
||||
static constexpr S32 PBRTYPE_COUNT = 5; // number of PBR map types
|
||||
|
||||
public:
|
||||
// public because ... functors? -Zi
|
||||
void onCommitFlip(const LLSD& user_data);
|
||||
|
||||
// Blinn-Phong texture transforms and controls
|
||||
// public because ... functors? -Zi
|
||||
LLSpinCtrl* mCtrlTexScaleU;
|
||||
LLSpinCtrl* mCtrlTexScaleV;
|
||||
LLSpinCtrl* mCtrlBumpyScaleU;
|
||||
LLSpinCtrl* mCtrlBumpyScaleV;
|
||||
LLSpinCtrl* mCtrlShinyScaleU;
|
||||
LLSpinCtrl* mCtrlShinyScaleV;
|
||||
LLSpinCtrl* mCtrlTexOffsetU;
|
||||
LLSpinCtrl* mCtrlTexOffsetV;
|
||||
LLSpinCtrl* mCtrlBumpyOffsetU;
|
||||
LLSpinCtrl* mCtrlBumpyOffsetV;
|
||||
LLSpinCtrl* mCtrlShinyOffsetU;
|
||||
LLSpinCtrl* mCtrlShinyOffsetV;
|
||||
LLSpinCtrl* mCtrlTexRot;
|
||||
LLSpinCtrl* mCtrlBumpyRot;
|
||||
LLSpinCtrl* mCtrlShinyRot;
|
||||
|
||||
// Blinn-Phong texture transforms and controls
|
||||
// public to give functors access -Zi
|
||||
LLComboBox* mComboTexGen;
|
||||
LLCheckBoxCtrl* mCheckPlanarAlign;
|
||||
|
||||
// Tab controls
|
||||
// public to give functors access -Zi
|
||||
LLTabContainer* mTabsMatChannel;
|
||||
void onMatTabChange();
|
||||
|
||||
private:
|
||||
bool isAlpha() { return mIsAlpha; }
|
||||
|
||||
// Update visibility of controls to match current UI mode
|
||||
// (e.g. materials vs media editing)
|
||||
//
|
||||
// Do NOT call updateUI from within this function.
|
||||
//
|
||||
void updateVisibility(LLViewerObject* objectp = nullptr);
|
||||
|
||||
// Convenience funcs to keep the visual flack to a minimum
|
||||
//
|
||||
LLUUID getCurrentNormalMap();
|
||||
LLUUID getCurrentSpecularMap();
|
||||
U32 getCurrentShininess();
|
||||
U32 getCurrentBumpiness();
|
||||
U8 getCurrentDiffuseAlphaMode();
|
||||
U8 getCurrentAlphaMaskCutoff();
|
||||
U8 getCurrentEnvIntensity();
|
||||
U8 getCurrentGlossiness();
|
||||
F32 getCurrentBumpyRot();
|
||||
F32 getCurrentBumpyScaleU();
|
||||
F32 getCurrentBumpyScaleV();
|
||||
F32 getCurrentBumpyOffsetU();
|
||||
F32 getCurrentBumpyOffsetV();
|
||||
F32 getCurrentShinyRot();
|
||||
F32 getCurrentShinyScaleU();
|
||||
F32 getCurrentShinyScaleV();
|
||||
F32 getCurrentShinyOffsetU();
|
||||
F32 getCurrentShinyOffsetV();
|
||||
|
||||
// <FS:Zi> map tab states to various values
|
||||
// TODO: should be done with tab-change signals and flags, really
|
||||
S32 getCurrentMaterialType() const;
|
||||
S32 getCurrentMatChannel() const;
|
||||
S32 getCurrentPBRChannel() const;
|
||||
void selectMaterialType(S32 material_type);
|
||||
void selectMatChannel(S32 mat_channel);
|
||||
void selectPBRChannel(S32 pbr_channel);
|
||||
|
||||
F32 getCurrentTextureRot();
|
||||
F32 getCurrentTextureScaleU();
|
||||
F32 getCurrentTextureScaleV();
|
||||
F32 getCurrentTextureOffsetU();
|
||||
F32 getCurrentTextureOffsetV();
|
||||
|
||||
//
|
||||
// Build tool controls
|
||||
//
|
||||
|
||||
// private Tab controls
|
||||
LLTabContainer* mTabsPBRMatMedia;
|
||||
LLTabContainer* mTabsPBRChannel;
|
||||
|
||||
// common controls and parameters for Blinn-Phong and PBR
|
||||
LLButton* mBtnCopyFaces;
|
||||
LLButton* mBtnPasteFaces;
|
||||
LLSpinCtrl* mCtrlGlow;
|
||||
LLSpinCtrl* mCtrlRpt;
|
||||
|
||||
// Blinn-Phong alpha parameters
|
||||
LLSpinCtrl* mCtrlColorTransp; // transparency = 1 - alpha
|
||||
LLView* mColorTransPercent;
|
||||
LLTextBox* mLabelAlphaMode;
|
||||
LLComboBox* mComboAlphaMode;
|
||||
LLSpinCtrl* mCtrlMaskCutoff;
|
||||
LLCheckBoxCtrl* mCheckFullbright;
|
||||
|
||||
// private Blinn-Phong texture transforms and controls
|
||||
LLView* mLabelTexGen;
|
||||
LLView* mLabelBumpiness;
|
||||
LLComboBox* mComboBumpiness;
|
||||
LLView* mLabelShininess;
|
||||
LLComboBox* mComboShininess;
|
||||
// others are above in the public section
|
||||
LLSpinCtrl* mCtrlGlossiness;
|
||||
LLSpinCtrl* mCtrlEnvironment;
|
||||
|
||||
// Blinn-Phong Diffuse tint color swatch
|
||||
LLColorSwatchCtrl* mColorSwatch;
|
||||
|
||||
// Blinn-Phong Diffuse texture swatch
|
||||
LLTextureCtrl* mTextureCtrl;
|
||||
|
||||
// Blinn-Phong Normal texture swatch
|
||||
LLTextureCtrl* mBumpyTextureCtrl;
|
||||
|
||||
// Blinn-Phong Specular texture swatch
|
||||
LLTextureCtrl* mShinyTextureCtrl;
|
||||
|
||||
// Blinn-Phong Specular tint color swatch
|
||||
LLColorSwatchCtrl* mShinyColorSwatch;
|
||||
|
||||
// Texture alignment and maps synchronization
|
||||
LLButton* mBtnAlignMedia;
|
||||
LLButton* mBtnAlignTextures;
|
||||
LLCheckBoxCtrl* mCheckSyncMaterials;
|
||||
|
||||
// Media
|
||||
LLButton* mBtnDeleteMedia;
|
||||
LLButton* mBtnAddMedia;
|
||||
LLMediaCtrl* mTitleMedia;
|
||||
LLTextBox* mTitleMediaText;
|
||||
|
||||
// PBR
|
||||
LLTextureCtrl* mMaterialCtrlPBR;
|
||||
LLColorSwatchCtrl* mBaseTintPBR;
|
||||
LLTextureCtrl* mBaseTexturePBR;
|
||||
LLTextureCtrl* mNormalTexturePBR;
|
||||
LLTextureCtrl* mORMTexturePBR;
|
||||
LLTextureCtrl* mEmissiveTexturePBR;
|
||||
LLColorSwatchCtrl* mEmissiveTintPBR;
|
||||
LLCheckBoxCtrl* mCheckDoubleSidedPBR;
|
||||
LLSpinCtrl* mAlphaPBR;
|
||||
LLTextBox* mLabelAlphaModePBR;
|
||||
LLComboBox* mAlphaModePBR;
|
||||
LLSpinCtrl* mMaskCutoffPBR;
|
||||
LLSpinCtrl* mMetallicFactorPBR;
|
||||
LLSpinCtrl* mRoughnessFactorPBR;
|
||||
LLButton* mBtnSavePBR;
|
||||
|
||||
struct
|
||||
{
|
||||
std::array<LLUUID, LLGLTFMaterial::GLTF_TEXTURE_INFO_COUNT> mMap;
|
||||
LLColor4 mBaseColorTint;
|
||||
F32 mMetallic;
|
||||
F32 mRoughness;
|
||||
LLColor4 mEmissiveTint;
|
||||
LLGLTFMaterial::AlphaMode mAlphaMode;
|
||||
F32 mAlphaCutoff;
|
||||
bool mDoubleSided;
|
||||
} mPBRBaseMaterialParams;
|
||||
|
||||
// map PBR material map types to glTF material types
|
||||
LLGLTFMaterial::TextureInfo mPBRChannelToTextureInfo[PBRTYPE_COUNT] =
|
||||
{
|
||||
LLGLTFMaterial::GLTF_TEXTURE_INFO_COUNT, // PBRTYPE_RENDER_MATERIAL_ID
|
||||
LLGLTFMaterial::GLTF_TEXTURE_INFO_BASE_COLOR, // PBRTYPE_BASE_COLOR
|
||||
LLGLTFMaterial::GLTF_TEXTURE_INFO_METALLIC_ROUGHNESS, // PBRTYPE_METALLIC_ROUGHNESS
|
||||
LLGLTFMaterial::GLTF_TEXTURE_INFO_EMISSIVE, // PBRTYPE_EMISSIVE
|
||||
LLGLTFMaterial::GLTF_TEXTURE_INFO_NORMAL // PBRTYPE_NORMAL
|
||||
};
|
||||
|
||||
// Dirty flags - taken from llmaterialeditor.cpp ... LL please put this in a .h! -Zi
|
||||
U32 mUnsavedChanges; // flags to indicate individual changed parameters
|
||||
|
||||
// Hey look everyone, a type-safe alternative to copy and paste! :)
|
||||
//
|
||||
|
||||
// Update material parameters by applying 'edit_func' to selected TEs
|
||||
//
|
||||
template<
|
||||
typename DataType,
|
||||
typename SetValueType,
|
||||
void (LLMaterial::*MaterialEditFunc)(SetValueType data) >
|
||||
static void edit(FSPanelFace* p, DataType data, int te = -1, const LLUUID &only_for_object_id = LLUUID())
|
||||
{
|
||||
FSMaterialEditFunctor< DataType, SetValueType, MaterialEditFunc > edit(data);
|
||||
struct LLSelectedTEEditMaterial : public LLSelectedTEMaterialFunctor
|
||||
{
|
||||
LLSelectedTEEditMaterial(FSPanelFace* panel, FSMaterialEditFunctor< DataType, SetValueType, MaterialEditFunc >* editp, const LLUUID &only_for_object_id) : _panel(panel), _edit(editp), _only_for_object_id(only_for_object_id) {}
|
||||
virtual ~LLSelectedTEEditMaterial() {};
|
||||
virtual LLMaterialPtr apply(LLViewerObject* object, S32 face, LLTextureEntry* tep, LLMaterialPtr& current_material)
|
||||
{
|
||||
if (_edit && (_only_for_object_id.isNull() || _only_for_object_id == object->getID()))
|
||||
{
|
||||
LLMaterialPtr new_material = _panel->createDefaultMaterial(current_material);
|
||||
llassert_always(new_material);
|
||||
|
||||
// Determine correct alpha mode for current diffuse texture
|
||||
// (i.e. does it have an alpha channel that makes alpha mode useful)
|
||||
//
|
||||
// _panel->isAlpha() "lies" when one face has alpha and the rest do not (NORSPEC-329)
|
||||
// need to get per-face answer to this question for sane alpha mode retention on updates.
|
||||
//
|
||||
bool is_alpha_face = object->isImageAlphaBlended(face);
|
||||
|
||||
// need to keep this original answer for valid comparisons in logic below
|
||||
//
|
||||
U8 original_default_alpha_mode = is_alpha_face ? LLMaterial::DIFFUSE_ALPHA_MODE_BLEND : LLMaterial::DIFFUSE_ALPHA_MODE_NONE;
|
||||
|
||||
U8 default_alpha_mode = original_default_alpha_mode;
|
||||
|
||||
if (!current_material.isNull())
|
||||
{
|
||||
default_alpha_mode = current_material->getDiffuseAlphaMode();
|
||||
}
|
||||
|
||||
// Insure we don't inherit the default of blend by accident...
|
||||
// this will be stomped by a legit request to change the alpha mode by the apply() below
|
||||
//
|
||||
new_material->setDiffuseAlphaMode(default_alpha_mode);
|
||||
|
||||
// Do "It"!
|
||||
//
|
||||
_edit->apply(new_material);
|
||||
|
||||
U32 new_alpha_mode = new_material->getDiffuseAlphaMode();
|
||||
LLUUID new_normal_map_id = new_material->getNormalID();
|
||||
LLUUID new_spec_map_id = new_material->getSpecularID();
|
||||
|
||||
if ((new_alpha_mode == LLMaterial::DIFFUSE_ALPHA_MODE_BLEND) && !is_alpha_face)
|
||||
{
|
||||
new_alpha_mode = LLMaterial::DIFFUSE_ALPHA_MODE_NONE;
|
||||
new_material->setDiffuseAlphaMode(LLMaterial::DIFFUSE_ALPHA_MODE_NONE);
|
||||
}
|
||||
|
||||
bool is_default_blend_mode = (new_alpha_mode == original_default_alpha_mode);
|
||||
bool is_need_material = !is_default_blend_mode || !new_normal_map_id.isNull() || !new_spec_map_id.isNull();
|
||||
|
||||
if (!is_need_material)
|
||||
{
|
||||
LL_DEBUGS("Materials") << "Removing material from object " << object->getID() << " face " << face << LL_ENDL;
|
||||
LLMaterialMgr::getInstance()->remove(object->getID(),face);
|
||||
new_material = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_DEBUGS("Materials") << "Putting material on object " << object->getID() << " face " << face << ", material: " << new_material->asLLSD() << LL_ENDL;
|
||||
LLMaterialMgr::getInstance()->put(object->getID(),face,*new_material);
|
||||
}
|
||||
|
||||
object->setTEMaterialParams(face, new_material);
|
||||
return new_material;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
FSMaterialEditFunctor< DataType, SetValueType, MaterialEditFunc >* _edit;
|
||||
FSPanelFace *_panel;
|
||||
const LLUUID & _only_for_object_id;
|
||||
} editor(p, &edit, only_for_object_id);
|
||||
LLSelectMgr::getInstance()->selectionSetMaterialParams(&editor, te);
|
||||
}
|
||||
|
||||
template<
|
||||
typename DataType,
|
||||
typename ReturnType,
|
||||
ReturnType (LLMaterial::* const MaterialGetFunc)() const >
|
||||
static void getTEMaterialValue(DataType& data_to_return, bool& identical,DataType default_value, bool has_tolerance = false, DataType tolerance = DataType())
|
||||
{
|
||||
DataType data_value = default_value;
|
||||
struct GetTEMaterialVal : public LLSelectedTEGetFunctor<DataType>
|
||||
{
|
||||
GetTEMaterialVal(DataType default_value) : _default(default_value) {}
|
||||
virtual ~GetTEMaterialVal() {}
|
||||
|
||||
DataType get(LLViewerObject* object, S32 face)
|
||||
{
|
||||
DataType ret = _default;
|
||||
LLMaterialPtr material_ptr;
|
||||
LLTextureEntry* tep = object ? object->getTE(face) : NULL;
|
||||
if (tep)
|
||||
{
|
||||
material_ptr = tep->getMaterialParams();
|
||||
if (!material_ptr.isNull())
|
||||
{
|
||||
ret = (material_ptr->*(MaterialGetFunc))();
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
DataType _default;
|
||||
} GetFunc(default_value);
|
||||
identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &GetFunc, data_value, has_tolerance, tolerance);
|
||||
data_to_return = data_value;
|
||||
}
|
||||
|
||||
template<
|
||||
typename DataType,
|
||||
typename ReturnType, // some kids just have to different...
|
||||
ReturnType (LLTextureEntry::* const TEGetFunc)() const >
|
||||
static void getTEValue(DataType& data_to_return, bool& identical, DataType default_value, bool has_tolerance = false, DataType tolerance = DataType())
|
||||
{
|
||||
DataType data_value = default_value;
|
||||
struct GetTEVal : public LLSelectedTEGetFunctor<DataType>
|
||||
{
|
||||
GetTEVal(DataType default_value) : _default(default_value) {}
|
||||
virtual ~GetTEVal() {}
|
||||
|
||||
DataType get(LLViewerObject* object, S32 face) {
|
||||
LLTextureEntry* tep = object ? object->getTE(face) : NULL;
|
||||
return tep ? ((tep->*(TEGetFunc))()) : _default;
|
||||
}
|
||||
DataType _default;
|
||||
} GetTEValFunc(default_value);
|
||||
identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &GetTEValFunc, data_value, has_tolerance, tolerance );
|
||||
data_to_return = data_value;
|
||||
}
|
||||
|
||||
// Update vis and enabling of specific subsets of controls based on material params
|
||||
// (e.g. hide the spec controls if no spec texture is applied)
|
||||
//
|
||||
void updateShinyControls(bool is_setting_texture = false, bool mess_with_combobox = false);
|
||||
void updateBumpyControls(bool is_setting_texture = false, bool mess_with_combobox = false);
|
||||
void updateAlphaControls();
|
||||
void updateUIGLTF(LLViewerObject* objectp, bool& has_pbr_material, bool& has_faces_without_pbr, bool force_set_values);
|
||||
|
||||
void updateSelectedGLTFMaterials(std::function<void(LLGLTFMaterial*)> func);
|
||||
void updateGLTFTextureTransform(float value, U32 pbr_type, std::function<void(LLGLTFMaterial::TextureTransform*)> edit);
|
||||
|
||||
void setMaterialOverridesFromSelection();
|
||||
|
||||
bool mIsAlpha;
|
||||
|
||||
LLSD mClipboardParams;
|
||||
|
||||
LLSD mMediaSettings;
|
||||
bool mNeedMediaTitle;
|
||||
|
||||
class Selection
|
||||
{
|
||||
public:
|
||||
void connect();
|
||||
|
||||
// Returns true if the selected objects or sides have changed since
|
||||
// this was last called, and no object update is pending
|
||||
bool update();
|
||||
|
||||
// Prevents update() returning true until the provided object is
|
||||
// updated. Necessary to prevent controls updating when the mouse is
|
||||
// held down.
|
||||
void setDirty() { mChanged = true; };
|
||||
|
||||
// Callbacks
|
||||
void onSelectionChanged() { mNeedsSelectionCheck = true; }
|
||||
void onSelectedObjectUpdated(const LLUUID &object_id, S32 side);
|
||||
|
||||
protected:
|
||||
bool compareSelection();
|
||||
|
||||
bool mChanged = false;
|
||||
|
||||
boost::signals2::scoped_connection mSelectConnection;
|
||||
bool mNeedsSelectionCheck = true;
|
||||
S32 mSelectedObjectCount = 0;
|
||||
S32 mSelectedTECount = 0;
|
||||
LLUUID mSelectedObjectID;
|
||||
S32 mLastSelectedSide = -1;
|
||||
};
|
||||
|
||||
static Selection sMaterialOverrideSelection;
|
||||
|
||||
std::unique_ptr<PBRPickerAgentListener> mAgentInventoryListener;
|
||||
std::unique_ptr<PBRPickerObjectListener> mVOInventoryListener;
|
||||
|
||||
public:
|
||||
#if defined(FS_DEF_GET_MAT_STATE)
|
||||
#undef FS_DEF_GET_MAT_STATE
|
||||
#endif
|
||||
|
||||
#if defined(FS_DEF_GET_TE_STATE)
|
||||
#undef FS_DEF_GET_TE_STATE
|
||||
#endif
|
||||
|
||||
#if defined(FS_DEF_EDIT_MAT_STATE)
|
||||
FS_DEF_EDIT_MAT_STATE
|
||||
#endif
|
||||
|
||||
// Accessors for selected TE material state
|
||||
//
|
||||
#define FS_DEF_GET_MAT_STATE(DataType,ReturnType,MaterialMemberFunc,DefaultValue,HasTolerance,Tolerance) \
|
||||
static void MaterialMemberFunc(DataType& data, bool& identical, bool has_tolerance = HasTolerance, DataType tolerance = Tolerance) \
|
||||
{ \
|
||||
getTEMaterialValue< DataType, ReturnType, &LLMaterial::MaterialMemberFunc >(data, identical, DefaultValue, has_tolerance, tolerance); \
|
||||
}
|
||||
|
||||
// Mutators for selected TE material
|
||||
//
|
||||
#define FS_DEF_EDIT_MAT_STATE(DataType,ReturnType,MaterialMemberFunc) \
|
||||
static void MaterialMemberFunc(FSPanelFace* p, DataType data, int te = -1, const LLUUID &only_for_object_id = LLUUID()) \
|
||||
{ \
|
||||
edit< DataType, ReturnType, &LLMaterial::MaterialMemberFunc >(p, data, te, only_for_object_id); \
|
||||
}
|
||||
|
||||
// Accessors for selected TE state proper (legacy settings etc)
|
||||
//
|
||||
#define FS_DEF_GET_TE_STATE(DataType,ReturnType,TexEntryMemberFunc,DefaultValue,HasTolerance,Tolerance) \
|
||||
static void TexEntryMemberFunc(DataType& data, bool& identical, bool has_tolerance = HasTolerance, DataType tolerance = Tolerance) \
|
||||
{ \
|
||||
getTEValue< DataType, ReturnType, &LLTextureEntry::TexEntryMemberFunc >(data, identical, DefaultValue, has_tolerance, tolerance); \
|
||||
}
|
||||
|
||||
class LLSelectedTEMaterial
|
||||
{
|
||||
public:
|
||||
static void getCurrent(LLMaterialPtr& material_ptr, bool& identical_material);
|
||||
static void getMaxSpecularRepeats(F32& repeats, bool& identical);
|
||||
static void getMaxNormalRepeats(F32& repeats, bool& identical);
|
||||
static void getCurrentDiffuseAlphaMode(U8& diffuse_alpha_mode, bool& identical, bool diffuse_texture_has_alpha);
|
||||
|
||||
FS_DEF_GET_MAT_STATE(LLUUID,const LLUUID&,getNormalID,LLUUID::null, false, LLUUID::null)
|
||||
FS_DEF_GET_MAT_STATE(LLUUID,const LLUUID&,getSpecularID,LLUUID::null, false, LLUUID::null)
|
||||
FS_DEF_GET_MAT_STATE(F32,F32,getSpecularRepeatX,1.0f, true, 0.001f)
|
||||
FS_DEF_GET_MAT_STATE(F32,F32,getSpecularRepeatY,1.0f, true, 0.001f)
|
||||
FS_DEF_GET_MAT_STATE(F32,F32,getSpecularOffsetX,0.0f, true, 0.001f)
|
||||
FS_DEF_GET_MAT_STATE(F32,F32,getSpecularOffsetY,0.0f, true, 0.001f)
|
||||
FS_DEF_GET_MAT_STATE(F32,F32,getSpecularRotation,0.0f, true, 0.001f)
|
||||
|
||||
FS_DEF_GET_MAT_STATE(F32,F32,getNormalRepeatX,1.0f, true, 0.001f)
|
||||
FS_DEF_GET_MAT_STATE(F32,F32,getNormalRepeatY,1.0f, true, 0.001f)
|
||||
FS_DEF_GET_MAT_STATE(F32,F32,getNormalOffsetX,0.0f, true, 0.001f)
|
||||
FS_DEF_GET_MAT_STATE(F32,F32,getNormalOffsetY,0.0f, true, 0.001f)
|
||||
FS_DEF_GET_MAT_STATE(F32,F32,getNormalRotation,0.0f, true, 0.001f)
|
||||
|
||||
FS_DEF_EDIT_MAT_STATE(U8,U8,setDiffuseAlphaMode);
|
||||
FS_DEF_EDIT_MAT_STATE(U8,U8,setAlphaMaskCutoff);
|
||||
|
||||
FS_DEF_EDIT_MAT_STATE(F32,F32,setNormalOffsetX);
|
||||
FS_DEF_EDIT_MAT_STATE(F32,F32,setNormalOffsetY);
|
||||
FS_DEF_EDIT_MAT_STATE(F32,F32,setNormalRepeatX);
|
||||
FS_DEF_EDIT_MAT_STATE(F32,F32,setNormalRepeatY);
|
||||
FS_DEF_EDIT_MAT_STATE(F32,F32,setNormalRotation);
|
||||
|
||||
FS_DEF_EDIT_MAT_STATE(F32,F32,setSpecularOffsetX);
|
||||
FS_DEF_EDIT_MAT_STATE(F32,F32,setSpecularOffsetY);
|
||||
FS_DEF_EDIT_MAT_STATE(F32,F32,setSpecularRepeatX);
|
||||
FS_DEF_EDIT_MAT_STATE(F32,F32,setSpecularRepeatY);
|
||||
FS_DEF_EDIT_MAT_STATE(F32,F32,setSpecularRotation);
|
||||
|
||||
FS_DEF_EDIT_MAT_STATE(U8,U8,setEnvironmentIntensity);
|
||||
FS_DEF_EDIT_MAT_STATE(U8,U8,setSpecularLightExponent);
|
||||
|
||||
FS_DEF_EDIT_MAT_STATE(LLUUID,const LLUUID&,setNormalID);
|
||||
FS_DEF_EDIT_MAT_STATE(LLUUID,const LLUUID&,setSpecularID);
|
||||
FS_DEF_EDIT_MAT_STATE(LLColor4U, const LLColor4U&,setSpecularLightColor);
|
||||
};
|
||||
|
||||
class LLSelectedTE
|
||||
{
|
||||
public:
|
||||
static void getFace(class LLFace*& face_to_return, bool& identical_face);
|
||||
static void getImageFormat(LLGLenum& image_format_to_return, bool& identical_face);
|
||||
static void getTexId(LLUUID& id, bool& identical);
|
||||
static void getObjectScaleS(F32& scale_s, bool& identical);
|
||||
static void getObjectScaleT(F32& scale_t, bool& identical);
|
||||
static void getMaxDiffuseRepeats(F32& repeats, bool& identical);
|
||||
|
||||
FS_DEF_GET_TE_STATE(U8,U8,getBumpmap,0, false, 0)
|
||||
FS_DEF_GET_TE_STATE(U8,U8,getShiny,0, false, 0)
|
||||
FS_DEF_GET_TE_STATE(U8,U8,getFullbright,0, false, 0)
|
||||
FS_DEF_GET_TE_STATE(F32,F32,getRotation,0.0f, true, 0.001f)
|
||||
FS_DEF_GET_TE_STATE(F32,F32,getOffsetS,0.0f, true, 0.001f)
|
||||
FS_DEF_GET_TE_STATE(F32,F32,getOffsetT,0.0f, true, 0.001f)
|
||||
FS_DEF_GET_TE_STATE(F32,F32,getScaleS,1.0f, true, 0.001f)
|
||||
FS_DEF_GET_TE_STATE(F32,F32,getScaleT,1.0f, true, 0.001f)
|
||||
FS_DEF_GET_TE_STATE(F32,F32,getGlow,0.0f, true, 0.001f)
|
||||
FS_DEF_GET_TE_STATE(LLTextureEntry::e_texgen,LLTextureEntry::e_texgen,getTexGen,LLTextureEntry::TEX_GEN_DEFAULT, false, LLTextureEntry::TEX_GEN_DEFAULT)
|
||||
FS_DEF_GET_TE_STATE(LLColor4,const LLColor4&,getColor,LLColor4::white, false, LLColor4::black);
|
||||
};
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -102,7 +102,6 @@
|
|||
#include "llworld.h"
|
||||
#include "llworldmap.h"
|
||||
#include "stringize.h"
|
||||
#include "boost/foreach.hpp"
|
||||
#include "llcorehttputil.h"
|
||||
#include "lluiusage.h"
|
||||
// [RLVa:KB] - Checked: 2011-11-04 (RLVa-1.4.4a)
|
||||
|
|
@ -1675,23 +1674,27 @@ void LLAgent::pitch(F32 angle)
|
|||
|
||||
LLVector3 skyward = getReferenceUpVector();
|
||||
|
||||
// SL-19286 Avatar is upside down when viewed from below
|
||||
// after left-clicking the mouse on the avatar and dragging down
|
||||
//
|
||||
// The issue is observed on angle below 10 degrees
|
||||
const F32 look_down_limit = 179.f * DEG_TO_RAD;
|
||||
const F32 look_up_limit = 10.f * DEG_TO_RAD;
|
||||
|
||||
F32 angle_from_skyward = acos(mFrameAgent.getAtAxis() * skyward);
|
||||
|
||||
// clamp pitch to limits
|
||||
if ((angle >= 0.f) && (angle_from_skyward + angle > look_down_limit))
|
||||
if (angle >= 0.f)
|
||||
{
|
||||
angle = look_down_limit - angle_from_skyward;
|
||||
const F32 look_down_limit = 179.f * DEG_TO_RAD;
|
||||
F32 angle_from_skyward = acos(mFrameAgent.getAtAxis() * skyward);
|
||||
if (angle_from_skyward + angle > look_down_limit)
|
||||
{
|
||||
angle = look_down_limit - angle_from_skyward;
|
||||
}
|
||||
}
|
||||
else if ((angle < 0.f) && (angle_from_skyward + angle < look_up_limit))
|
||||
else if (angle < 0.f)
|
||||
{
|
||||
angle = look_up_limit - angle_from_skyward;
|
||||
const F32 look_up_limit = 5.f * DEG_TO_RAD;
|
||||
const LLVector3& viewer_camera_pos = LLViewerCamera::getInstance()->getOrigin();
|
||||
LLVector3 agent_focus_pos = getPosAgentFromGlobal(gAgentCamera.calcFocusPositionTargetGlobal());
|
||||
LLVector3 look_dir = agent_focus_pos - viewer_camera_pos;
|
||||
F32 angle_from_skyward = angle_between(look_dir, skyward);
|
||||
if (angle_from_skyward + angle < look_up_limit)
|
||||
{
|
||||
angle = look_up_limit - angle_from_skyward;
|
||||
}
|
||||
}
|
||||
|
||||
if (fabs(angle) > 1e-4)
|
||||
|
|
@ -2806,7 +2809,7 @@ void LLAgent::endAnimationUpdateUI()
|
|||
skip_list.insert(LLFloaterReg::findInstance("stats"));
|
||||
}
|
||||
// <FS:LO> //FIRE-6385: Show all script dialogs still after leaving mouselook
|
||||
BOOST_FOREACH(LLFloater *tmp, LLFloaterReg::getFloaterList("script_floater"))
|
||||
for (LLFloater *tmp : LLFloaterReg::getFloaterList("script_floater"))
|
||||
{
|
||||
skip_list.insert(tmp);
|
||||
}
|
||||
|
|
@ -2825,7 +2828,7 @@ void LLAgent::endAnimationUpdateUI()
|
|||
//LLFloaterIMContainer* im_box = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container");
|
||||
//LLFloaterIMContainer::floater_list_t conversations;
|
||||
//im_box->getDetachedConversationFloaters(conversations);
|
||||
//BOOST_FOREACH(LLFloater* conversation, conversations)
|
||||
//for (LLFloater* conversation : conversations)
|
||||
//{
|
||||
// LL_INFOS() << "skip_list.insert(session_floater): " << conversation->getTitle() << LL_ENDL;
|
||||
// skip_list.insert(conversation);
|
||||
|
|
@ -2981,7 +2984,7 @@ void LLAgent::endAnimationUpdateUI()
|
|||
skip_list.insert(LLFloaterReg::findInstance("stats"));
|
||||
}
|
||||
// <FS:LO> //FIRE-6385: Show all script dialogs still when entering mouselook
|
||||
BOOST_FOREACH(LLFloater *tmp, LLFloaterReg::getFloaterList("script_floater"))
|
||||
for (LLFloater* tmp : LLFloaterReg::getFloaterList("script_floater"))
|
||||
{
|
||||
skip_list.insert(tmp);
|
||||
}
|
||||
|
|
@ -5159,14 +5162,14 @@ void LLAgent::teleportViaLandmark(const LLUUID& landmark_asset_id)
|
|||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
// <FS:Ansariel> FIRE-7273: Typing does not stop after using Cmd Line tph
|
||||
if (landmark_asset_id.isNull())
|
||||
{
|
||||
// This might mean a local TP, so pro-actively stop typing
|
||||
gAgent.stopTyping();
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
if (landmark_asset_id.isNull())
|
||||
{
|
||||
gAgentCamera.resetView();
|
||||
// <FS:Ansariel> FIRE-7273: Typing does not stop after using Cmd Line tph
|
||||
// This might mean a local TP, so pro-actively stop typing
|
||||
gAgent.stopTyping();
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
mTeleportRequest = LLTeleportRequestPtr(new LLTeleportRequestViaLandmark(landmark_asset_id));
|
||||
startTeleportRequest();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ class LLTeleportRequest;
|
|||
|
||||
|
||||
|
||||
typedef boost::shared_ptr<LLTeleportRequest> LLTeleportRequestPtr;
|
||||
typedef std::shared_ptr<LLTeleportRequest> LLTeleportRequestPtr;
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// Types
|
||||
|
|
@ -134,7 +134,7 @@ public:
|
|||
private:
|
||||
bool mInitialized;
|
||||
bool mFirstLogin;
|
||||
boost::shared_ptr<LLAgentListener> mListener;
|
||||
std::shared_ptr<LLAgentListener> mListener;
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// Session
|
||||
|
|
|
|||
|
|
@ -1879,7 +1879,7 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit)
|
|||
|
||||
head_offset.clearVec();
|
||||
F32 fixup;
|
||||
if (gAgentAvatarp->hasPelvisFixup(fixup))
|
||||
if (gAgentAvatarp->hasPelvisFixup(fixup) && !gAgentAvatarp->isSitting())
|
||||
{
|
||||
head_offset[VZ] -= fixup;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1806,10 +1806,6 @@ void AISUpdate::doUpdate()
|
|||
LL_DEBUGS("Inventory") << "cat version update " << cat->getName() << " to version " << cat->getVersion() << LL_ENDL;
|
||||
if (cat->getVersion() != version)
|
||||
{
|
||||
LL_WARNS() << "Possible version mismatch for category " << cat->getName()
|
||||
<< ", viewer version " << cat->getVersion()
|
||||
<< " AIS version " << version << " !!!Adjusting local version!!!" << LL_ENDL;
|
||||
|
||||
// the AIS version should be considered the true version. Adjust
|
||||
// our local category model to reflect this version number. Otherwise
|
||||
// it becomes possible to get stuck with the viewer being out of
|
||||
|
|
@ -1819,13 +1815,23 @@ void AISUpdate::doUpdate()
|
|||
// is performed. This occasionally gets out of sync however.
|
||||
if (version != LLViewerInventoryCategory::VERSION_UNKNOWN)
|
||||
{
|
||||
LL_WARNS() << "Possible version mismatch for category " << cat->getName()
|
||||
<< ", viewer version " << cat->getVersion()
|
||||
<< " AIS version " << version << " !!!Adjusting local version!!!" << LL_ENDL;
|
||||
cat->setVersion(version);
|
||||
}
|
||||
else
|
||||
{
|
||||
// We do not account for update if version is UNKNOWN, so we shouldn't rise version
|
||||
// either or viewer will get stuck on descendants count -1, try to refetch folder instead
|
||||
cat->fetch();
|
||||
//
|
||||
// Todo: proper backoff?
|
||||
|
||||
LL_WARNS() << "Possible version mismatch for category " << cat->getName()
|
||||
<< ", viewer version " << cat->getVersion()
|
||||
<< " AIS version " << version << " !!!Rerequesting category!!!" << LL_ENDL;
|
||||
const S32 LONG_EXPIRY = 360;
|
||||
cat->fetch(LONG_EXPIRY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@
|
|||
#include "llviewerprecompiledheaders.h"
|
||||
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <boost/foreach.hpp>
|
||||
#include "llaccordionctrltab.h"
|
||||
#include "llagent.h"
|
||||
#include "llagentcamera.h"
|
||||
|
|
@ -1709,7 +1708,7 @@ void LLAppearanceMgr::removeOutfitPhoto(const LLUUID& outfit_id)
|
|||
sub_cat_array,
|
||||
outfit_item_array,
|
||||
LLInventoryModel::EXCLUDE_TRASH);
|
||||
BOOST_FOREACH(LLViewerInventoryItem* outfit_item, outfit_item_array)
|
||||
for (LLViewerInventoryItem* outfit_item : outfit_item_array)
|
||||
{
|
||||
LLViewerInventoryItem* linked_item = outfit_item->getLinkedItem();
|
||||
if (linked_item != NULL)
|
||||
|
|
@ -3848,7 +3847,7 @@ void update_base_outfit_after_ordering()
|
|||
sub_cat_array,
|
||||
outfit_item_array,
|
||||
LLInventoryModel::EXCLUDE_TRASH);
|
||||
BOOST_FOREACH(LLViewerInventoryItem* outfit_item, outfit_item_array)
|
||||
for (LLViewerInventoryItem* outfit_item : outfit_item_array)
|
||||
{
|
||||
LLViewerInventoryItem* linked_item = outfit_item->getLinkedItem();
|
||||
if (linked_item != NULL)
|
||||
|
|
@ -4165,7 +4164,7 @@ LLSD LLAppearanceMgr::dumpCOF() const
|
|||
LLUUID linked_asset_id(linked_item->getAssetUUID());
|
||||
md5.update((unsigned char*)linked_asset_id.mData, 16);
|
||||
U32 flags = linked_item->getFlags();
|
||||
md5.update(boost::lexical_cast<std::string>(flags));
|
||||
md5.update(std::to_string(flags));
|
||||
}
|
||||
else if (LLAssetType::AT_LINK_FOLDER != inv_item->getActualType())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -158,7 +158,6 @@
|
|||
|
||||
// Third party library includes
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/foreach.hpp>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <boost/regex.hpp>
|
||||
#include <boost/throw_exception.hpp>
|
||||
|
|
@ -1393,7 +1392,7 @@ bool LLAppViewer::init()
|
|||
// LLSD item(LeapCommand);
|
||||
// LeapCommand.append(item);
|
||||
// }
|
||||
// BOOST_FOREACH(const std::string& leap, llsd::inArray(LeapCommand))
|
||||
// for (const auto& leap : llsd::inArray(LeapCommand))
|
||||
// {
|
||||
// LL_INFOS("InitInfo") << "processing --leap \"" << leap << '"' << LL_ENDL;
|
||||
// // We don't have any better description of this plugin than the
|
||||
|
|
@ -1973,7 +1972,7 @@ bool LLAppViewer::cleanup()
|
|||
LLNotifications::instance().clear();
|
||||
|
||||
// workaround for DEV-35406 crash on shutdown
|
||||
LLEventPumps::instance().reset();
|
||||
LLEventPumps::instance().reset(true);
|
||||
|
||||
GrowlManager::destroyManager(); // <FS> Growl support
|
||||
|
||||
|
|
@ -2759,7 +2758,7 @@ bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key,
|
|||
LL_ERRS() << "Invalid settings location list" << LL_ENDL;
|
||||
}
|
||||
|
||||
BOOST_FOREACH(const SettingsGroup& group, mSettingsLocationList->groups)
|
||||
for (const SettingsGroup& group : mSettingsLocationList->groups)
|
||||
{
|
||||
// skip settings groups that aren't the one we requested
|
||||
if (group.name() != location_key) continue;
|
||||
|
|
@ -2771,7 +2770,7 @@ bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key,
|
|||
return false;
|
||||
}
|
||||
|
||||
BOOST_FOREACH(const SettingsFile& file, group.files)
|
||||
for (const SettingsFile& file : group.files)
|
||||
{
|
||||
// <FS:Ansariel> Skip quickprefs settings - we don't have a settings group
|
||||
// for it as it's not a regular settings file
|
||||
|
|
@ -2844,11 +2843,11 @@ bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key,
|
|||
std::string LLAppViewer::getSettingsFilename(const std::string& location_key,
|
||||
const std::string& file)
|
||||
{
|
||||
BOOST_FOREACH(const SettingsGroup& group, mSettingsLocationList->groups)
|
||||
for (const SettingsGroup& group : mSettingsLocationList->groups)
|
||||
{
|
||||
if (group.name() == location_key)
|
||||
{
|
||||
BOOST_FOREACH(const SettingsFile& settings_file, group.files)
|
||||
for (const SettingsFile& settings_file : group.files)
|
||||
{
|
||||
if (settings_file.name() == file)
|
||||
{
|
||||
|
|
@ -3570,7 +3569,7 @@ void LLAppViewer::initStrings()
|
|||
// Now that we've set "[sourceid]", have to go back through
|
||||
// default_trans_args and reinitialize all those other keys because some
|
||||
// of them, in turn, reference "[sourceid]".
|
||||
BOOST_FOREACH(std::string key, default_trans_args)
|
||||
for (const std::string& key : default_trans_args)
|
||||
{
|
||||
std::string brackets(key), nobrackets(key);
|
||||
// Invalid to inspect key[0] if key is empty(). But then, the entire
|
||||
|
|
@ -5541,17 +5540,24 @@ void LLAppViewer::idle()
|
|||
// When appropriate, update agent location to the simulator.
|
||||
F32 agent_update_time = agent_update_timer.getElapsedTimeF32();
|
||||
F32 agent_force_update_time = mLastAgentForceUpdate + agent_update_time;
|
||||
BOOL force_update = gAgent.controlFlagsDirty()
|
||||
|| (mLastAgentControlFlags != gAgent.getControlFlags())
|
||||
|| (agent_force_update_time > (1.0f / (F32) AGENT_FORCE_UPDATES_PER_SECOND));
|
||||
if (force_update || (agent_update_time > (1.0f / (F32) AGENT_UPDATES_PER_SECOND)))
|
||||
bool timed_out = agent_update_time > (1.0f / (F32)AGENT_UPDATES_PER_SECOND);
|
||||
BOOL force_send =
|
||||
// if there is something to send
|
||||
(gAgent.controlFlagsDirty() && timed_out)
|
||||
// if something changed
|
||||
|| (mLastAgentControlFlags != gAgent.getControlFlags())
|
||||
// keep alive
|
||||
|| (agent_force_update_time > (1.0f / (F32) AGENT_FORCE_UPDATES_PER_SECOND));
|
||||
// timing out doesn't warranty that an update will be sent,
|
||||
// just that it will be checked.
|
||||
if (force_send || timed_out)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK;
|
||||
// Send avatar and camera info
|
||||
mLastAgentControlFlags = gAgent.getControlFlags();
|
||||
mLastAgentForceUpdate = force_update ? 0 : agent_force_update_time;
|
||||
mLastAgentForceUpdate = force_send ? 0 : agent_force_update_time;
|
||||
if(!gAgent.getPhantom())
|
||||
send_agent_update(force_update);
|
||||
send_agent_update(force_send);
|
||||
agent_update_timer.reset();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -344,6 +344,11 @@ LLNotificationChiclet::LLNotificationChiclet(const Params& p)
|
|||
}
|
||||
}
|
||||
|
||||
LLNotificationChiclet::~LLNotificationChiclet()
|
||||
{
|
||||
mNotificationChannel.reset();
|
||||
}
|
||||
|
||||
void LLNotificationChiclet::onMenuItemClicked(const LLSD& user_data)
|
||||
{
|
||||
std::string action = user_data.asString();
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue