mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-07-01 13:56:06 -04:00
--Bug fixes
-Allow for empty fields in template files. --Code changes -When parsing, a boolean is not available to specify whether to use the default values if they are not present. This will be false for template files.
This commit is contained in:
@ -81,11 +81,12 @@ private:
|
||||
/// <param name="parser">The parser to use</param>
|
||||
/// <param name="filename">The full path and name of the file</param>
|
||||
/// <param name="embers">Storage for the embers read from the file</param>
|
||||
/// <param name="useDefaults">True to use defaults if they are not present in the file, else false to use invalid values as placeholders to indicate the values were not present. Default: true.</param>
|
||||
/// <returns>True if success, else false.</returns>
|
||||
template <typename T>
|
||||
static bool ParseEmberFile(XmlToEmber<T>& parser, string filename, vector<Ember<T>>& embers)
|
||||
static bool ParseEmberFile(XmlToEmber<T>& parser, string filename, vector<Ember<T>>& embers, bool useDefaults = true)
|
||||
{
|
||||
if (!parser.Parse(filename.c_str(), embers))
|
||||
if (!parser.Parse(filename.c_str(), embers, useDefaults))
|
||||
{
|
||||
cout << "Error parsing flame file " << filename << ", returning without executing." << endl;
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user