We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b21ff32 commit 99c812fCopy full SHA for 99c812f
source/mir/string_map.d
@@ -532,7 +532,7 @@ struct StringMap(T, U = uint)
532
/++
533
Complexity: `O(log(s))`, where `s` is the number of the keys with the same length as the input key.
534
+/
535
- ref inout(T) opIndex()(scope const(char)[] key) @trusted pure inout //@nogc
+ ref inout(T) opIndex()(scope const(char)[] key) @trusted pure inout nothrow@nogc
536
{
537
size_t index;
538
if (implementation && implementation.findIndex(key, index))
@@ -542,8 +542,9 @@ struct StringMap(T, U = uint)
542
assert (index < length);
543
return implementation._values[index];
544
}
545
- import mir.exception: MirException;
546
- throw new MirException("No member: ", key);
+ import core.exception : onRangeError;
+ onRangeError();
547
+ return implementation._values[0]; // TODO: remove when onRangeError is noreturn
548
549
550
version(mir_test) static if (is(T == int))
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments