Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit90d3da1

Browse files
committed
Fix a few typos in simplehash.h.
Author: Erik RijkersDiscussion: <274e4c8ac545d6622735f97c1f6c354b@xs4all.nl>
1 parentfca41ac commit90d3da1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎src/include/lib/simplehash.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ SH_PREV(SH_TYPE *tb, uint32 curelem, uint32 startelem)
256256
returncurelem;
257257
}
258258

259-
/* return distance between bucket andit's optimal position */
259+
/* return distance between bucket andits optimal position */
260260
staticinlineuint32
261261
SH_DISTANCE_FROM_OPTIMAL(SH_TYPE*tb,uint32optimal,uint32bucket)
262262
{
@@ -349,7 +349,7 @@ SH_GROW(SH_TYPE *tb, uint32 newsize)
349349
*
350350
* To be able to simply move entries over, we have to start not at the
351351
* first bucket (i.e olddata[0]), but find the first bucket that's either
352-
* empty, or is occupied by an entry atit's optimal position. Such a
352+
* empty, or is occupied by an entry atits optimal position. Such a
353353
* bucket has to exist in any table with a load factor under 1, as not all
354354
* buckets are occupied, i.e. there always has to be an empty bucket. By
355355
* starting at such a bucket we can move the entries to the larger table,
@@ -485,9 +485,9 @@ SH_INSERT(SH_TYPE *tb, SH_KEY_TYPE key, bool *found)
485485
/*
486486
* If the bucket is not empty, we either found a match (in which case
487487
* we're done), or we have to decide whether to skip over or move the
488-
* colliding entry. When thethecollidingelements distance toit's
488+
* colliding entry. When the collidingelement's distance toits
489489
* optimal position is smaller than the to-be-inserted entry's, we
490-
* shift the colliding entry (andit's followers) forward by one.
490+
* shift the colliding entry (andits followers) forward by one.
491491
*/
492492

493493
if (SH_COMPARE_KEYS(tb,hash,key,entry))

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp