mirror of
https://github.com/dlang/phobos.git
synced 2025-04-27 05:30:33 +03:00
zlib: remove switch from in front of super()
This commit is contained in:
parent
a9f1ff0f2e
commit
7d3a82cc3c
1 changed files with 9 additions and 4 deletions
13
std/zlib.d
13
std/zlib.d
|
@ -75,9 +75,9 @@ enum
|
|||
|
||||
class ZlibException : Exception
|
||||
{
|
||||
this(int errnum)
|
||||
{ string msg;
|
||||
|
||||
private static string getmsg(int errnum) nothrow @nogc pure @safe
|
||||
{
|
||||
string msg;
|
||||
switch (errnum)
|
||||
{
|
||||
case Z_STREAM_END: msg = "stream end"; break;
|
||||
|
@ -90,7 +90,12 @@ class ZlibException : Exception
|
|||
case Z_VERSION_ERROR: msg = "version error"; break;
|
||||
default: msg = "unknown error"; break;
|
||||
}
|
||||
super(msg);
|
||||
return msg;
|
||||
}
|
||||
|
||||
this(int errnum)
|
||||
{
|
||||
super(getmsg(errnum));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue