Give template parameters more meaningful names

This commit is contained in:
Mike Bierlee 2014-05-15 23:49:42 +02:00
parent 5df222f509
commit 6fb34bb233

View file

@ -15,13 +15,13 @@ class Container {
private this() { private this() {
} }
public static Registration register(T)() { public static Registration register(ClassType)() {
Registration newRegistration = { typeid(T) }; Registration newRegistration = { typeid(ClassType) };
registrations[newRegistration.registratedType] = newRegistration; registrations[newRegistration.registratedType] = newRegistration;
return newRegistration; return newRegistration;
} }
public static T resolve(T)() { public static ClassType resolve(ClassType)() {
return cast(T) registrations[typeid(T)].getInstance(); return cast(ClassType) registrations[typeid(ClassType)].getInstance();
} }
} }