Only call string.Format in Debug.Assert if really necessary
authormain() <main@ehvag.eu.org>
Wed, 11 Feb 2015 18:42:29 +0000 (19:42 +0100)
committermain() <main@ehvag.eu.org>
Wed, 11 Feb 2015 18:42:29 +0000 (19:42 +0100)
commit2e6efb314938c3c70ad32030893c4f1bccd5ec09
treedeaceef6264e406609624ac46c91f1f971b581c5
parentceef1e2379154c17492c2fba727a67a030511f78
Only call string.Format in Debug.Assert if really necessary

Right now (without this change), Debug.Assert **always** formats its string parameters, even if doing so wouldn't be necessary because the condition is true. This has a huge impact on code that asserts frequently because it assumes that calling Assert(true, ...) is cheap.
mcs/class/System/System.Diagnostics/Debug.cs