Age | Commit message (Collapse) | Author |
|
This adds the conversion function to_deprecated_fly_string() to enable
conversion from new FlyString to DeprecatedFlyString.
|
|
|
|
|
|
|
|
Now UFixedBigInt exposes API to do wide multiplications of this kind
efficiently.
|
|
|
|
|
|
This function will be used in the next commit in "BigIntBase.h".
|
|
|
|
|
|
|
|
This prevents a warning when compiling jakt that it's not implemented.
|
|
|
|
Indented #cmakedefine01 is supported since CMake 3.10:
https://cmake.org/cmake/help/latest/release/3.10.html#commands
We're on 3.16, and the minimum required for Serenity itself is 3.25, so
this should be fine. And it makes CLion's auto-formatter much happier!
|
|
This disallows erroneous `#if ARCH(x86_64)` (note lowercase x).
|
|
We are currently only validating long strings.
|
|
It will soon be included in the Kernel by way of String.h. Utf8View
includes DeprecatedString, which is not allowed in the Kernel.
|
|
For example, the code point U+002F could be encoded as UTF-8 with the
bytes 0x80 0xAF. This trick has historically been used to bypass
security checks.
|
|
This will allow validating UTF-8 strings at compile time, such as from
String::from_utf8_short_string.
|
|
|
|
|
|
This is needed to have code for creating an in-memory sRGB profile using
the (floating-ppoint) numbers from the sRGB spec and having the
fixed-point values in the profile match what they are in other software
(such as GIMP).
It has the side effect of making the FixedPoint ctor no longer constexpr
(which seems fine; nothing was currently relying on that).
Some of FixedPoint's member functions don't round yet, which requires
tweaking a test.
|
|
|
|
`consume_until(foo)` stops before foo, and so does
`ignore_until(Predicate)`, so let's make the other `ignore_until()`
overloads consistent with that so they're less confusing.
|
|
This commit moves the implementation of getopt into AK, and converts its
API to understand and use StringView instead of char*.
Everything else is caught in the crossfire of making
Option::accept_value() take a StringView instead of a char const*.
With this, we must now pass a Span<StringView> to ArgsParser::parse(),
applications using LibMain are unaffected, but anything not using that
or taking its own argc/argv has to construct a Vector<StringView> for
this method.
|
|
|
|
The output of the DeprecatedString::bijective_base_from() is now
correct for numbers larger than base^2.
This makes column names display correctly in Spreadsheet.
|
|
|
|
This fixes the build with Apple Clang.
|
|
We briefly discussed this when adding the new String type but couldn't
settle on a name. However, having to use String::from_utf8() on every
literal string is a bit unwieldy, so let's have these options available!
Naming-wise '_string' is not as short as 'sv' but should be relatively
clear; it also matches '_bigint' and '_ubigint' in length.
'_short_string' may be longer than the actual string itself, but it's
still an improvement over the static function :^)
Since our C++ source files are UTF-8 encoded anyway, it should be
impossible to create a string literal with invalid UTF-8, so including
that in the name is not as important as in the function that can receive
arbitrary data.
|
|
Apparently without this file, we won't be able to compile due to missing
includes to TimeManagement and KBufferBuilder.
|
|
At the moment, this processes the RIFF chunk structure and extracts
the ICCP chunk, so that `icc` can now print ICC profiles embedded
in webp files. (And are image files really more than containers
of icc profiles?)
It doesn't even decode image dimensions yet.
The lossy format is a VP8 video frame. Once we get to that, we
might want to move all the image decoders into a new LibImageDecoders
that depends on both LibGfx and LibVideo. (Other newer image formats
like heic and av1f also use video frames for image data.)
|
|
Forward declare its iterator and add a peek() method analagous to
Utf8CodePointIterator::peek().
|
|
Useful for debugging, especially in templated contexts.
|
|
|
|
This naming scheme matches Vector.
This also changes `take_last` to move the value it takes, and delete by
known pointer, avoiding a full lookup and potential copies.
|
|
Otherwise we end up with invalid pointers to them, breaking iteration.
|
|
The caller is responsible for determining how long the string is that
they want to read.
|
|
This reverts commit 3c7a0ef1ac279c99bc4ee72085278ea70c210889.
This broke Jakt, which will need some adjustments to its code generation
before we can commit to being this strict.
|
|
Until now, it was possible to assign a RP<T const> or NNRP<T const>
to RP<T> or NNRP<T>. This meant that the constness of the T was lost.
We had a lot of code that relied on this sloppiness, and by the time
you see this commit, I hopefully found and fixed all of it. :^)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This stops us needing a lot of ugly `FlyString { ... }` wrappers. THis
is the behavior that `DeprecatedFlyString(DeprecatedString)` has so it
should be fine.
|
|
The patch also contains modifications on several classes, functions or
files that are related to the `JPGLoader`.
Renaming include:
- JPGLoader{.h, .cpp}
- JPGImageDecoderPlugin
- JPGLoadingContext
- JPG_DEBUG
- decode_jpg
- FuzzJPGLoader.cpp
- Few string literals or texts
|
|
Fixes #17514 by comparing to 0 before truncating the fractional part.
|
|
Thanks to Timothy Flynn for the test!
Fixes #17141
|