Skip to content

Commit 9763bce

Browse files
Make integral serialization nothrow
1 parent 1222b9f commit 9763bce

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/google/protobuf/encoding.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ if (isIntegral!T)
4141
}
4242
}
4343

44-
unittest
44+
nothrow unittest
4545
{
4646
import std.array : array;
4747

src/google/protobuf/internal.d

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ struct Varint
1010
private ubyte index;
1111
private ubyte _length;
1212

13-
this(long value)
13+
this(long value) nothrow
1414
out { assert(_length > 0); }
1515
do
1616
{
@@ -39,11 +39,11 @@ struct Varint
3939
this._length = cast(ubyte) encodingLength(value);
4040
}
4141

42-
@property bool empty() const { return index >= _length; }
43-
@property ubyte front() const { return opIndex(index); }
44-
void popFront() { ++index; }
42+
@property bool empty() nothrow const { return index >= _length; }
43+
@property ubyte front() nothrow const { return opIndex(index); }
44+
void popFront() nothrow { ++index; }
4545

46-
ubyte opIndex(size_t index) const
46+
ubyte opIndex(size_t index) nothrow const
4747
in { assert(index < _length); }
4848
do
4949
{
@@ -55,7 +55,7 @@ struct Varint
5555
return result & 0x7F;
5656
}
5757

58-
@property size_t length() const
58+
@property size_t length() nothrow const
5959
in { assert(index <= _length); }
6060
do
6161
{

0 commit comments

Comments
 (0)