mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:47:34 +00:00
AK+Userland: Fix some compiler warnings and make variables const-ref
This fixes a few compiler warnings and makes some variables const-ref in preparation for the next commit which changes how ByteBuffer works.
This commit is contained in:
parent
fbdc3b0ee2
commit
f0fa51773a
7 changed files with 12 additions and 7 deletions
|
@ -423,14 +423,14 @@ static void print(JS::Value value)
|
|||
outln();
|
||||
}
|
||||
|
||||
static bool file_has_shebang(ByteBuffer file_contents)
|
||||
static bool file_has_shebang(ByteBuffer const& file_contents)
|
||||
{
|
||||
if (file_contents.size() >= 2 && file_contents[0] == '#' && file_contents[1] == '!')
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
static StringView strip_shebang(ByteBuffer file_contents)
|
||||
static StringView strip_shebang(ByteBuffer const& file_contents)
|
||||
{
|
||||
size_t i = 0;
|
||||
for (i = 2; i < file_contents.size(); ++i) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue