/******************************************************************************
* Icinga 2 *
- * Copyright (C) 2012-2018 Icinga Development Team (https://www.icinga.com/) *
+ * Copyright (C) 2012-2018 Icinga Development Team (https://icinga.com/) *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
Object::Ptr Boolean::GetPrototype()
{
- static Dictionary::Ptr prototype;
-
- if (!prototype) {
- prototype = new Dictionary();
- prototype->Set("to_string", new Function("Boolean#to_string", BooleanToString, {}, true));
- }
+ static Dictionary::Ptr prototype = new Dictionary({
+ { "to_string", new Function("Boolean#to_string", BooleanToString, {}, true) }
+ });
return prototype;
}