Skip to content

Commit c88f5d2

Browse files
authored
Merge pull request #4176 from secondlife/geenz/2025.04-to-develop
Merge 2025.04 into develop
2 parents aeefc73 + 39625d1 commit c88f5d2

File tree

193 files changed

+33424
-12112
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

193 files changed

+33424
-12112
lines changed

.github/workflows/.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
qatest.yaml -text eol=crlf

.github/workflows/qatest.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,4 +572,4 @@ jobs:
572572
# uses: actions/upload-artifact@v4
573573
# with:
574574
# name: test-results-${{ matrix.runner }}
575-
# path: ${{ matrix.install-path }}/regressionTest/test_results.html
575+
# path: ${{ matrix.install-path }}/regressionTest/test_results.html

indra/cmake/Linking.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ elseif (WINDOWS)
6767
legacy_stdio_definitions
6868
)
6969
else()
70-
include(CMakeFindFrameworks)
7170
find_library(COREFOUNDATION_LIBRARY CoreFoundation)
7271
find_library(CARBON_LIBRARY Carbon)
7372
find_library(COCOA_LIBRARY Cocoa)

indra/cmake/Python.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ elseif (WINDOWS)
1313
foreach(hive HKEY_CURRENT_USER HKEY_LOCAL_MACHINE)
1414
# prefer more recent Python versions to older ones, if multiple versions
1515
# are installed
16-
foreach(pyver 3.12 3.11 3.10 3.9 3.8 3.7)
16+
foreach(pyver 3.13 3.12 3.11 3.10 3.9 3.8 3.7)
1717
list(APPEND regpaths "[${hive}\\SOFTWARE\\Python\\PythonCore\\${pyver}\\InstallPath]")
1818
endforeach()
1919
endforeach()

indra/llcommon/llsdutil.h

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,61 @@ LLSD shallow(LLSD value, LLSD filter=LLSD()) { return llsd_shallow(value, filter
553553

554554
} // namespace llsd
555555

556+
/*****************************************************************************
557+
* toArray(), toMap()
558+
*****************************************************************************/
559+
namespace llsd
560+
{
561+
562+
// For some T convertible to LLSD, given std::vector<T> myVec,
563+
// toArray(myVec) returns an LLSD array whose entries correspond to the
564+
// items in myVec.
565+
// For some U convertible to LLSD, given function U xform(const T&),
566+
// toArray(myVec, xform) returns an LLSD array whose every entry is
567+
// xform(item) of the corresponding item in myVec.
568+
// toArray() actually works with any container<C> usable with range
569+
// 'for', not just std::vector.
570+
// (Once we get C++20 we can use std::identity instead of this default lambda.)
571+
template<typename C, typename FUNC>
572+
LLSD toArray(const C& container, FUNC&& func = [](const auto& arg) { return arg; })
573+
{
574+
LLSD array;
575+
for (const auto& item : container)
576+
{
577+
array.append(std::forward<FUNC>(func)(item));
578+
}
579+
return array;
580+
}
581+
582+
// For some T convertible to LLSD, given std::map<std::string, T> myMap,
583+
// toMap(myMap) returns an LLSD map whose entries correspond to the
584+
// (key, value) pairs in myMap.
585+
// For some U convertible to LLSD, given function
586+
// std::pair<std::string, U> xform(const std::pair<std::string, T>&),
587+
// toMap(myMap, xform) returns an LLSD map whose every entry is
588+
// xform(pair) of the corresponding (key, value) pair in myMap.
589+
// toMap() actually works with any container usable with range 'for', not
590+
// just std::map. It need not even be an associative container, as long as
591+
// you pass an xform function that returns std::pair<std::string, U>.
592+
// (Once we get C++20 we can use std::identity instead of this default lambda.)
593+
template<typename C, typename FUNC>
594+
LLSD toMap(const C& container, FUNC&& func = [](const auto& arg) { return arg; })
595+
{
596+
LLSD map;
597+
for (const auto& pair : container)
598+
{
599+
const auto& [key, value] = std::forward<FUNC>(func)(pair);
600+
map[key] = value;
601+
}
602+
return map;
603+
}
604+
605+
} // namespace llsd
606+
607+
/*****************************************************************************
608+
* boost::hash<LLSD>
609+
*****************************************************************************/
610+
556611
// Specialization for generating a hash value from an LLSD block.
557612
namespace boost
558613
{

indra/llcommon/lluuid.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -174,14 +174,6 @@ void LLUUID::toString(std::string& out) const
174174
(U8)(mData[15]));
175175
}
176176

177-
// *TODO: deprecate
178-
void LLUUID::toString(char* out) const
179-
{
180-
std::string buffer;
181-
toString(buffer);
182-
strcpy(out, buffer.c_str()); /* Flawfinder: ignore */
183-
}
184-
185177
void LLUUID::toCompressedString(std::string& out) const
186178
{
187179
char bytes[UUID_BYTES + 1];
@@ -190,13 +182,6 @@ void LLUUID::toCompressedString(std::string& out) const
190182
out.assign(bytes, UUID_BYTES);
191183
}
192184

193-
// *TODO: deprecate
194-
void LLUUID::toCompressedString(char* out) const
195-
{
196-
memcpy(out, mData, UUID_BYTES); /* Flawfinder: ignore */
197-
out[UUID_BYTES] = '\0';
198-
}
199-
200185
std::string LLUUID::getString() const
201186
{
202187
return asString();

indra/llcommon/lluuid.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,7 @@ class LL_COMMON_API LLUUID
103103
friend LL_COMMON_API std::ostream& operator<<(std::ostream& s, const LLUUID &uuid);
104104
friend LL_COMMON_API std::istream& operator>>(std::istream& s, LLUUID &uuid);
105105

106-
void toString(char *out) const; // Does not allocate memory, needs 36 characters (including \0)
107106
void toString(std::string& out) const;
108-
void toCompressedString(char *out) const; // Does not allocate memory, needs 17 characters (including \0)
109107
void toCompressedString(std::string& out) const;
110108

111109
std::string asString() const;

indra/llinventory/llsettingsbase.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ class LLSettingsBase :
398398

399399
private:
400400
bool mLLSDDirty;
401-
bool mDirty;
401+
bool mDirty; // gates updateSettings
402402
bool mReplaced; // super dirty!
403403

404404
static LLSD combineSDMaps(const LLSD &first, const LLSD &other);

indra/llinventory/llsettingssky.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1932,6 +1932,7 @@ LLUUID LLSettingsSky::getCloudNoiseTextureId() const
19321932
void LLSettingsSky::setCloudNoiseTextureId(const LLUUID &id)
19331933
{
19341934
mCloudTextureId = id;
1935+
setDirtyFlag(true);
19351936
setLLSDDirty();
19361937
}
19371938

@@ -1976,6 +1977,7 @@ LLVector2 LLSettingsSky::getCloudScrollRate() const
19761977
void LLSettingsSky::setCloudScrollRate(const LLVector2 &val)
19771978
{
19781979
mScrollRate = val;
1980+
setDirtyFlag(true);
19791981
setLLSDDirty();
19801982
}
19811983

@@ -2134,6 +2136,7 @@ LLUUID LLSettingsSky::getMoonTextureId() const
21342136
void LLSettingsSky::setMoonTextureId(LLUUID id)
21352137
{
21362138
mMoonTextureId = id;
2139+
setDirtyFlag(true);
21372140
setLLSDDirty();
21382141
}
21392142

@@ -2218,6 +2221,7 @@ LLUUID LLSettingsSky::getSunTextureId() const
22182221
void LLSettingsSky::setSunTextureId(LLUUID id)
22192222
{
22202223
mSunTextureId = id;
2224+
setDirtyFlag(true);
22212225
setLLSDDirty();
22222226
}
22232227

indra/llmessage/llpacketring.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,14 @@ S32 LLPacketRing::receiveOrDropBufferedPacket(char *datap, bool drop)
209209

210210
if (!drop)
211211
{
212-
assert(packet_size > 0);
213-
memcpy(datap, packet->getData(), packet_size);
212+
if (packet_size > 0)
213+
{
214+
memcpy(datap, packet->getData(), packet_size);
215+
}
216+
else
217+
{
218+
assert(false);
219+
}
214220
}
215221
else
216222
{

0 commit comments

Comments
 (0)