summaryrefslogtreecommitdiff
path: root/indra
AgeCommit message (Collapse)Author
2024-09-27Introduce owning_ptr<T>; use it for JPEG2KEncode and JPEG2KDecode.Nat Goodspeed
owning_ptr<T> adapts std::unique_ptr<T> to be a better drop-in replacement for a legacy class that formerly stored plain T* data members, and explicitly destroyed them using domain-specific destructor functions. Directly substituting std::unique_ptr into JPEG2KEncode and JPEG2KDecode was cumbersome because every such pointer declaration required a redundant template parameter describing the deleter function passed into its constructor. Moreover, it required lots of little syntax tweaks: changing every assignment to a reset() call, changing every reference to a get() call. Using owning_ptr<T> allows us to leave the code more or less as it was before, save that assignment and destruction automatically handle the previous referenced T instance.
2024-09-27Linux GCC prefers the explicit std::string::assign() call.Nat Goodspeed
2024-09-27lltexlayerparams.h uses std::atomic<bool>, so #include <atomic>Nat Goodspeed
2024-09-27Automate memory management in JPEG2KEncode and JPEG2KDecode.Nat Goodspeed
Instead of using strdup() and free() to store comment_text in JPEG2KEncode, store a std::string. Similarly, instead of manually managing pointers to encoder, decoder, image, stream and codestream_info in JPEG2KDecode and JPEG2KEncode, use std::unique_ptr for each, specifying their respective deleter functions.
2024-09-27Migrate ~LLPointer()'s peculiar warning case to llpointer.cpp.Nat Goodspeed
This allows removing #include "llerror.h" from llpointer.h. Also remove #include "llmutex.h" as a heavy way to get <boost/functional/hash.hpp>. That requires adding #include "llmutex.h" to llimage.h, llnotifications.h, llwatchdog.cpp and llvolumemgr.cpp, which were inheriting it from llpointer.h.
2024-09-26Ditch last instances of LL_LIBRARY_INCLUDE.Nat Goodspeed
2024-09-26Merge remote branch 'develop' into marchcat/xcode-16Nat Goodspeed
2024-09-26Rename our lerp() to flerp(); call where MSVC balks at std::lerp().Nat Goodspeed
Now the lerp() in global namespace is std::lerp(), but it remains true that for some calls to std::lerp(), MSVC issues fatal argument conversion warnings. In those places, call flerp() (our historic lerp()) instead.
2024-09-26Reinstate our lerp() function, avoid "math.h" header.Nat Goodspeed
For reasons that remain unclear, MSVC likes our lerp() function better than its own std::lerp() function: publishing the latter into the global namespace, instead of defining our own, produces fatal argument conversion warnings. "math.h" publishes all of <cmath> into the global namespace, which causes a GCC conflict between std::lerp() and our lerp() function. Including <cmath> instead leaves std::lerp() in the std namespace, eliminating the conflict.
2024-09-26Fix GCC ambiguous-reversed-operator errors for `LLKeyData` compares.Nat Goodspeed
`LLKeyData::operator==(const LLKeyData&)` and `operator!=(const LLKeyData&)` were not themselves `const` methods. In C++20, that can produce a fatal warning that if the compare operands were reversed, you'd get different results. Making them both `const` should fix it. While touching the method definitions, make `operator==()` more intuitive, and make `operator!=()` simply negate `operator==()` instead of restating it in reverse.
2024-09-26Ditch our own (conflicting) definition of the lerp() function.Nat Goodspeed
Hoist `std::lerp()` into the global namespace instead.
2024-09-26#include <cmath> rather than "math.h" to avoid lerp() conflict.Nat Goodspeed
GCC on Linux complains that "math.h", which hoists all the standard library math functions into the global namespace for classic C compatibility, creates a conflict between `std::lerp()` and the `lerp()` function in llmath.h. (Perhaps we should just replace our `lerp()` definition with `using std::lerp;`) Anyway, bringing in <cmath> rather than "math.h" leaves standard library math functions in the `std` namespace, avoiding the conflict.
2024-09-26Fix a few more fsyspath conversions, removing explicit u8string().Nat Goodspeed
2024-09-25Adapt `fsyspath` for C++20 conventions.Nat Goodspeed
In C++20, `std::filesystem::u8path()` (that accepts a UTF-8 encoded `std::string` and returns a `std::filesystem::path`) is deprecated. Instead, to engage UTF-8 coding conversions, we're supposed to pass the `path` constructor a `std::u8string`, i.e. a `std::basic_string<char8_t>`. Since `char8_t` is a type distinct from both `char` and `unsigned char`, we must Do Something to pass a UTF-8 encoded `std::string` into `std::filesystem::path`. To avoid copying characters from a `std::string` into a temporary `std::u8string` and from there into the `std::filesystem::path`, make a `boost::transform_iterator` that accepts a `std::string_view::iterator` and adapts it to dereference `char8_t` characters. Make `fsyspath(std::string_view)` engage the base-class constructor accepting (iterator, iterator), adapting `string_view::begin()` and `end()` to deliver `char8_t` characters. Use the same tactic for `fsyspath::operator=(std::string_view)`, explicitly calling `std::filesystem::path::assign()` with the adapted iterators. To resolve ambiguities, provide both constructors and assignment operators accepting `(const std::string&)` and `(const char*)`, explicitly converting each to `std::string_view`. At the same time, `std::filesystem::path::u8string()` now returns `std::u8string` rather than `std::string`. Since `std::filesystem::path` delivers only that `std::u8string` rather than iterators into its internal representation, we can't avoid capturing it and copying to the returned `std::string`. Remove explicit `.u8string()` calls from a few existing `fsyspath` instances, now that `fsyspath` supports implicit conversion to `std::string`.
2024-09-26Force snapshot update when opening a snapshot panel and the resolution is ↵Ansariel
"Current Window" to determine correct image size and upload cost
2024-09-25Remove incorrectly calculated upload fee from snapshot options button based ↵Ansariel
on previously selected snapshot type and not necessarily snapshot to inventory
2024-09-25Fix upload cost calculation for snapshots to inventory based on encoded ↵Ansariel
image size and display upload cost to user
2024-09-25Remove orphaned LLPanelOutfitSnapshotInventoryAnsariel
2024-09-25Restore currently entered text in chat entry textbox after going through ↵Ansariel Hiller
history with Ctrl-PgUp/PgDown (#2680)
2024-09-25Fix memory leak in LLImageDimensionsInfo (#2679)Ansariel Hiller
2024-09-25More improvements and cleanup of LLViewerParcelOverlay (#2678)Ansariel Hiller
2024-09-25#2650 Add UI controls for debug settings: RenderTonemapMix RenderTonemapTypeMaxim Nikolenko
2024-09-25Merge branch 'develop' into marchcat/xcode-16Nat Goodspeed
2024-09-25Explain why apparently redundant LLPointer methods are necessary.Nat Goodspeed
Given templated constructors and assignment operators, it's tempting to remove specific constructors and assignment operators with the same LLPointer<Type> parameters. That turns out to be a mistake. Add comments to warn future maintainers.
2024-09-25Use copy-and-swap idiom for LLPointer's assignment operators.Nat Goodspeed
This affords strong exception safety. Also, eliminating the conditional may improve speed.
2024-09-25#2674 Optimize LLWorld::renderPropertyLines() - use simplified linesAlexander Gavriliuk
2024-09-24Add Lua scripts to viewer source treeAnsariel
2024-09-24LLConstPointer<T> is the same as LLPointer<const T>.Nat Goodspeed
Instead of restating the whole class, requiring changes to be made in parallel (which has already failed), just make a template alias.
2024-09-24Make `LLPointer` equality comparisons accept not-identical types.Nat Goodspeed
That is, both `LLPointer::operator==()` and `operator!=()` and the free function `operator==()` and `operator!=()` now accept pointer types other than the type of the subject `LLPointer`, letting the compiler apply implicit pointer conversions or diagnose an error.
2024-09-24#2559 No mouseover if a link is embedded with an emojiAlexander Gavriliuk
2024-09-24Merge pull request #2534 from secondlife/release/luau-scriptingnat-goodspeed
Add Lua scripting to develop, behind feature flag
2024-09-24Reduce memory allocations pinging the mainloop timeoutAnsariel
2024-09-24Performance improvements and cleanup in llviewerdisplay.cppAnsariel
2024-09-23Merge remote-tracking branch 'origin/release/2024.09-ExtraFPS' into developBrad Linden
2024-09-23Fix sky settings with reflection probe ambiance of 0 still receiving ↵Brad Linden
tonemapping (#2659) Co-authored-by: Rye Cogtail <rye@lindenlab.com>
2024-09-23Merge remote 'release/luau-scripting' into release/luau-scriptingNat Goodspeed
2024-09-24Restore WebRTC shutdown fix (#2658)Ansariel Hiller
2024-09-23include <utility> for Linux: std::forward is not predefinedNat Goodspeed
2024-09-23Merge remote branch 'develop' into release/luau-scripting for Maint BNat Goodspeed
2024-09-23Turn off tracy on linux to unbreak the build.Brad Linden
2024-09-23Merge branch 'develop' into marchcat/b-developAndrey Lihatskiy
# Conflicts: # indra/newview/llfeaturemanager.cpp # indra/newview/llviewertexturelist.cpp # indra/newview/llvoicewebrtc.cpp
2024-09-23Merge remote branch 'develop' into release/luau-scriptingNat Goodspeed
2024-09-23viewer#2627 instead of checking map for being empty got empty mapAndrey Kleshchev
2024-09-23viewer#2631 Optimize LLWearable::writeToAvatarAndrey Kleshchev
2024-09-23viewer#2631 Couple small tweaksAndrey Kleshchev
2024-09-23Merge remote branch 'develop'into release/luau-scriptingNat Goodspeed
2024-09-23Merge remote branch 'lua-script-args' into lua-script-argsNat Goodspeed
2024-09-23Use Lua command-line args to make frame_profile_quit.lua generic.Nat Goodspeed
Now the location to which to teleport and the camera focus point can both be specified by the caller, in this case the frame_profile bash script.
2024-09-23#2626 fix for incoming IM calls not being rejected when DND mode is activeMaxim Nikolenko
2024-09-22#2618 Roles and Members tab is a messAlexander Gavriliuk