addRepresenter is now pure.
This commit is contained in:
parent
ab9ba7f5ba
commit
7be10a44bf
|
@ -224,10 +224,11 @@ final class Representer
|
||||||
* }
|
* }
|
||||||
* --------------------
|
* --------------------
|
||||||
*/
|
*/
|
||||||
void addRepresenter(T)(Node function(ref Node, Representer) representer) @trusted
|
void addRepresenter(T)(Node function(ref Node, Representer) representer)
|
||||||
|
@trusted pure
|
||||||
{
|
{
|
||||||
assert((typeid(T) in representers_) is null,
|
assert((typeid(T) in representers_) is null,
|
||||||
"Representer function for data type " ~ typeid(T).toString() ~
|
"Representer function for data type " ~ T.stringof ~
|
||||||
" already specified. Can't specify another one");
|
" already specified. Can't specify another one");
|
||||||
representers_[typeid(T)] = representer;
|
representers_[typeid(T)] = representer;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue