Andrew Kaster
a78f967b93
Documentation: Recommend setting PREFIX_PATH instead of INSTALL_PREFIX
...
This was straight up the wrong CMake variable to set. We care about
where the project will find Lagom, not where it wants to install its own
binaries to.
2021-09-16 15:47:13 +00:00
Andrew Kaster
04d91e90c2
Meta: Fix Lagom RPATH for non-Ubuntu Linux and macOS hosts
...
Multi-lib distros like Gentoo and Fedora install lagom-core.so into
lagom-install/lib64 rather than lib. Set the install RPATH based on
CMAKE_INSTALL_LIBDIR to avoid the wrong path being set in the binaries.
Also apply macOS specific RPATH rules to fix the build on that platform.
2021-09-16 15:47:13 +00:00
Brian Gianforcaro
951cd68979
Shell: Use default instead of an empty constructor/destructor
...
Default implementations allow for more optimizations.
See: https://pvs-studio.com/en/docs/warnings/v832/
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
4a53c66b7f
FileSystemAccessServer: Only compute basename when prompting
...
pvs-studio flagged this as a potential performance optimization,
we only need to compute the basename when it's used.
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
677f227774
LibX86: Use default instead of an empty constructor/destructor
...
Default implementations allow for more optimizations.
See: https://pvs-studio.com/en/docs/warnings/v832/
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
b9c53a096a
LibVT: Use default instead of an empty constructor/destructor
...
Default implementations allow for more optimizations.
See: https://pvs-studio.com/en/docs/warnings/v832/
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
744de5ec69
LibThreading: Use default instead of an empty constructor/destructor
...
Default implementations allow for more optimizations.
See: https://pvs-studio.com/en/docs/warnings/v832/
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
bff33c67ab
LibThreading: Neither Mutex or MutexLocker should be movable / copyable
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
fdea5e1628
LibRegex: Pass RegexStringView and Vector<RegexStringView> by reference
...
Flagged by pvs-studio, it looks like these were intended to be passed by
reference originally, but it was missed. This avoids excessive argument
copy when searching / matching in the regex API.
Before:
Command: /usr/Tests/LibRegex/Regex --bench
Average time: 5998.29 ms (median: 5991, stddev: 102.18)
After:
Command: /usr/Tests/LibRegex/Regex --bench
Average time: 5623.2 ms (median: 5623, stddev: 86.25)
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
507effce5b
LibPDF: Use move to avoid unnecessary ref/unref of network device RefPtr
...
Flagged by pvs-studio as a potential perf optimization.
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
0db46eecdc
LibIPC: Use default instead of an empty constructor/destructor
...
Default implementations allow for more optimizations.
See: https://pvs-studio.com/en/docs/warnings/v832/
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
e2d154c74d
LibJS: Use default instead of an empty constructor/destructor
...
Default implementations allow for more optimizations.
See: https://pvs-studio.com/en/docs/warnings/v832/
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
fda48d7a6b
LibGfx: Use move to avoid unnecessary ref/unref of network device RefPtr
...
Flagged by pvs-studio as a potential perf optimization.
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
f327f54399
LibGfx: Use default instead of an empty constructor/destructor
...
Default implementations allow for more optimizations.
See: https://pvs-studio.com/en/docs/warnings/v832/
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
a7364eef3c
LibGUI: Use default instead of an empty constructor/destructor
...
Default implementations allow for more optimizations.
See: https://pvs-studio.com/en/docs/warnings/v832/
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
4fe99ff0d6
Kernel: Use move to avoid unnecessary ref/unref of network device RefPtr
...
Flagged by pvs-studio as a potential perf optimization.
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
24207d3795
Kernel: Fetch range once for each iteration of find_regions_intersecting
...
pvs-studio flagged this as a potential optimization.
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
e8ec1e908d
Kernel: Only instantiate main_program_metadata in the scope it's needed
...
pvs-studio flagged this as a potential perf optimization.
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
b530201111
Kernel: Make IPv4SocketTuple operator== by reference
...
No reason for this to copy when comparing equality.
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
85d36e56d2
Kernel: Pack Flock struct tighter
...
Flagged by pvs-studio, ordering the members from largest to smallest
allows us to save a few bytes in the size of the struct.
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
07b314e843
Kernel+LibC: Pack SC_stat_params struct tighter
...
Flagged by pvs-studio, ordering the members from largest to smallest
allows us to save a few bytes in the size of the struct.
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
be15bd3c86
Kernel+LibC: Pack SC_mount_params struct tighter
...
Flagged by pvs-studio, ordering the members from largest to smallest
allows us to save a few bytes in the size of the struct.
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
dcb327a83b
Kernel+LibC: Pack SC_setsockopt_params struct tighter
...
Flagged by pvs-studio, ordering the members from largest to smallest
allows us to save a few bytes in the size of the struct.
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
9956607283
Kernel+LibC: Pack SC_accept4_params struct tighter
...
Flagged by pvs-studio, ordering the members from largest to smallest
allows us to save a few bytes in the size of the struct.
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
b45ca5d56e
Kernel+LibC: Pack SC_inode_watcher_add_watch_params struct better
...
Flagged by pvs-studio, ordering the members from largest to smallest
allows us to save a few bytes in the size of the struct.
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
dba5710efa
LibCrypto: Use default instead of an empty constructor/destructor
...
Default implementations allow for more optimizations.
See: https://pvs-studio.com/en/docs/warnings/v832/
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
5dbc72a158
LibELF: Use default instead of an empty constructor/destructor
...
Default implementations allow for more optimizations.
See: https://pvs-studio.com/en/docs/warnings/v832/
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
889ade06fe
LibWeb: Use explicit move to avoid unnecessary RefPtr ref / unref
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
2b57018196
LibWeb: Use default instead of an empty constructor/destructor
...
Default implementations allow for more optimizations.
See: https://pvs-studio.com/en/docs/warnings/v832/
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
14eb736e22
AK: Reduce the scope of fraction_string to where it's needed
...
pvs-studio flagged this a potential optimization, as we only
need to really construct the fraction_string if is_double is
true.
2021-09-16 17:17:13 +02:00
Brian Gianforcaro
c192c303d2
AK: Use default constructor/destructor instead of declaring an empty one
...
Default implementations allow for more optimizations.
See: https://pvs-studio.com/en/docs/warnings/v832/
2021-09-16 17:17:13 +02:00
Marcus Nilsson
9fe43041f5
PixelPaint: Tweak layer/tool properties widget heights
...
There's no use for these two to be larger than necessary when
resizing the window.
2021-09-16 16:54:34 +02:00
Marcus Nilsson
b76fe6357a
PixelPaint: Don't select the same layer twice in LayerListWidget
...
Without this check we would do an unnecessary partial second round
trip because of the call chain:
LayerListWidget::set_selected_layer() ->
LayerListWidget::on_layer_select() ->
ImageEditor::set_active_layer() ->
ImageEditor::on_active_layer_change() ->
LayerListWidget::set_selected_layer()
2021-09-16 16:54:34 +02:00
Marcus Nilsson
eaa99968fb
PixelPaint: Don't update ImageEditor in set_active_layer()
...
Setting the active layer does not cause anything to render differently.
Thus no update is needed and the call to layers_did_change() is
unnecessary.
2021-09-16 16:54:34 +02:00
Karol Kosek
8f36429cb5
ThemeEditor: Save theme metrics and paths to file
...
Prior this change, custom title metrics seen in the Basalt theme
and custom icon paths in Redmond themes were dropped when saving a file.
Now any entry, even empty, will be saved. This may end up with slightly
larger files, but on other hand, users will be able to see every option
in a text editor, without a need to look at the code/docs.
2021-09-16 16:52:55 +02:00
Karol Kosek
d1e1096bc0
LibGfx: Enumerate metric theme roles
...
This change does practically nothing except that you no longer have to
put new roles there, as they are now automatically read from the enum
list.
2021-09-16 16:52:55 +02:00
Karol Kosek
6f4333fca7
LibGfx: Add support for enumerating by Metric and Path roles
...
For Theme Editor.
2021-09-16 16:52:55 +02:00
sin-ack
220b7dd779
Kernel: Weakly hold on to the file in LocalSocket
...
Because we were holding a strong ref to the OpenFileDescription in
LocalSocket and a strong ref to the LocalSocket in Inode, we were
creating a reference cycle in the event of the socket being cleaned up
after the file description did (i.e. unlinking the file before closing
the socket), because the file description never got destructed.
2021-09-16 16:50:36 +02:00
sin-ack
0ccef94a49
Kernel: Drop the receive buffer when socket enters the TimeWait state
...
The TimeWait state is intended to prevent another socket from taking the
address tuple in case any packets are still in transit after the final
close. Since this state never delivers packets to userspace, it doesn't
make sense to keep the receive buffer around.
2021-09-16 16:50:23 +02:00
Ali Mohammad Pur
f4d3c54c12
LibTLS: Close the underlying socket on EOF
...
This is 23febbed41
but without the bug
that makes the CI hang :^)
2021-09-16 16:42:51 +02:00
Tim Schumacher
dda216c334
Ports: Add a gawk port
2021-09-16 16:42:40 +02:00
Tim Schumacher
a1617faf44
LibC: Implement mbsinit and mbrtowc
2021-09-16 16:42:40 +02:00
Tim Schumacher
405f3d0aa3
LibC: Implement btowc()
2021-09-16 16:42:40 +02:00
Tim Schumacher
e4fa9c917e
LibC: Stub out a bunch of wchar functions
2021-09-16 16:42:40 +02:00
Tim Schumacher
230df61aef
LibC: Define ptrdiff_t limits
2021-09-16 16:42:40 +02:00
Tim Schumacher
328818af97
LibC: Provide a dummy mbstate_t in wchar.h
...
POSIX just says that mbstate_t should be an "object type other than an
array type" that can hold the conversion state for converting between
(multi-byte) characters and wide characters.
Since no other information regarding the contents is given, this
apparently means that we should add whatever we need once we start
implementing that conversion.
2021-09-16 16:42:40 +02:00
Tim Schumacher
8f9af4a582
LibC: Implement CODESET for langinfo
2021-09-16 16:42:40 +02:00
Idan Horowitz
5ea1810ada
LibJS: Convert PlainMonthDay AOs to ThrowCompletionOr
2021-09-16 13:53:37 +01:00
Idan Horowitz
229a5ce149
LibJS: Convert PlainTime AOs to ThrowCompletionOr
2021-09-16 13:53:37 +01:00
Idan Horowitz
c57a78423d
LibJS: Convert PlainYearMonth AOs to ThrowCompletionOr
2021-09-16 13:53:37 +01:00