mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 00:37:35 +00:00
Everywhere: Run clang-format
This commit is contained in:
parent
0376c127f6
commit
086969277e
1665 changed files with 8479 additions and 8479 deletions
|
@ -10,17 +10,17 @@
|
|||
|
||||
namespace Assistant {
|
||||
|
||||
static constexpr const int RECURSION_LIMIT = 10;
|
||||
static constexpr const int MAX_MATCHES = 256;
|
||||
static constexpr int const RECURSION_LIMIT = 10;
|
||||
static constexpr int const MAX_MATCHES = 256;
|
||||
|
||||
// Bonuses and penalties are used to build up a final score for the match.
|
||||
static constexpr const int SEQUENTIAL_BONUS = 15; // bonus for adjacent matches (needle: 'ca', haystack: 'cat')
|
||||
static constexpr const int SEPARATOR_BONUS = 30; // bonus if match occurs after a separator ('_' or ' ')
|
||||
static constexpr const int CAMEL_BONUS = 30; // bonus if match is uppercase and prev is lower (needle: 'myF' haystack: '/path/to/myFile.txt')
|
||||
static constexpr const int FIRST_LETTER_BONUS = 20; // bonus if the first letter is matched (needle: 'c' haystack: 'cat')
|
||||
static constexpr const int LEADING_LETTER_PENALTY = -5; // penalty applied for every letter in str before the first match
|
||||
static constexpr const int MAX_LEADING_LETTER_PENALTY = -15; // maximum penalty for leading letters
|
||||
static constexpr const int UNMATCHED_LETTER_PENALTY = -1; // penalty for every letter that doesn't matter
|
||||
static constexpr int const SEQUENTIAL_BONUS = 15; // bonus for adjacent matches (needle: 'ca', haystack: 'cat')
|
||||
static constexpr int const SEPARATOR_BONUS = 30; // bonus if match occurs after a separator ('_' or ' ')
|
||||
static constexpr int const CAMEL_BONUS = 30; // bonus if match is uppercase and prev is lower (needle: 'myF' haystack: '/path/to/myFile.txt')
|
||||
static constexpr int const FIRST_LETTER_BONUS = 20; // bonus if the first letter is matched (needle: 'c' haystack: 'cat')
|
||||
static constexpr int const LEADING_LETTER_PENALTY = -5; // penalty applied for every letter in str before the first match
|
||||
static constexpr int const MAX_LEADING_LETTER_PENALTY = -15; // maximum penalty for leading letters
|
||||
static constexpr int const UNMATCHED_LETTER_PENALTY = -1; // penalty for every letter that doesn't matter
|
||||
|
||||
static int calculate_score(String const& string, u8* index_points, size_t index_points_size)
|
||||
{
|
||||
|
|
|
@ -123,7 +123,7 @@ FileProvider::FileProvider()
|
|||
build_filesystem_cache();
|
||||
}
|
||||
|
||||
void FileProvider::query(const String& query, Function<void(NonnullRefPtrVector<Result>)> on_complete)
|
||||
void FileProvider::query(String const& query, Function<void(NonnullRefPtrVector<Result>)> on_complete)
|
||||
{
|
||||
build_filesystem_cache();
|
||||
|
||||
|
|
|
@ -132,7 +132,7 @@ class Provider : public RefCounted<Provider> {
|
|||
public:
|
||||
virtual ~Provider() = default;
|
||||
|
||||
virtual void query(const String&, Function<void(NonnullRefPtrVector<Result>)> on_complete) = 0;
|
||||
virtual void query(String const&, Function<void(NonnullRefPtrVector<Result>)> on_complete) = 0;
|
||||
};
|
||||
|
||||
class AppProvider final : public Provider {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue