Skip to content

Commit 4f28db6

Browse files
committed
not really pure
1 parent d6c471b commit 4f28db6

File tree

5 files changed

+294
-294
lines changed

5 files changed

+294
-294
lines changed

std/bigint.d

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ public:
366366
}
367367
/// Returns the value of this BigInt as a long,
368368
/// or +- long.max if outside the representable range.
369-
long toLong() pure const
369+
long toLong() const
370370
{
371371
return (sign ? -1 : 1) *
372372
(data.ulongLength() == 1 && (data.peekUlong(0) <= cast(ulong)(long.max))
@@ -375,7 +375,7 @@ public:
375375
}
376376
/// Returns the value of this BigInt as an int,
377377
/// or +- int.max if outside the representable range.
378-
long toInt() pure const
378+
long toInt() const
379379
{
380380
return (sign ? -1 : 1) *
381381
(data.uintLength() == 1 && (data.peekUint(0) <= cast(uint)(int.max))
@@ -384,13 +384,13 @@ public:
384384
}
385385
/// Number of significant uints which are used in storing this number.
386386
/// The absolute value of this BigInt is always < 2^^(32*uintLength)
387-
@property size_t uintLength() pure const
387+
@property size_t uintLength() const
388388
{
389389
return data.uintLength();
390390
}
391391
/// Number of significant ulongs which are used in storing this number.
392392
/// The absolute value of this BigInt is always < 2^^(64*ulongLength)
393-
@property size_t ulongLength() pure const
393+
@property size_t ulongLength() const
394394
{
395395
return data.ulongLength();
396396
}
@@ -440,16 +440,16 @@ private:
440440
if (!data.isZero())
441441
sign = !sign;
442442
}
443-
bool isZero() pure const
443+
bool isZero() const
444444
{
445445
return data.isZero();
446446
}
447-
bool isNegative() pure const
447+
bool isNegative() const
448448
{
449449
return sign;
450450
}
451451
// Generate a runtime error if division by zero occurs
452-
void checkDivByZero() pure const
452+
void checkDivByZero() const
453453
{
454454
assert(!isZero(), "BigInt division by zero");
455455
if (isZero())

std/complex.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ struct Complex(T) if (isFloatingPoint!T)
113113
T im;
114114

115115

116-
@safe pure nothrow // The following functions depend only on std.math.
116+
@safe nothrow // The following functions depend only on std.math.
117117
{
118118

119119
/** Calculate the absolute value (or modulus) of the number. */

0 commit comments

Comments
 (0)