mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-07-16 13:14:51 -04:00
--User changes
-Add a new option to EmberAnimate --ignore-existing which makes it skip rendering a frame if the files from all of the requested extensions for that frame already exist. --Code changes -Migrate to VS2022 and no longer use a version specific folder for the VS solution and project files. It is now under a version agnostic folder called Solution.
This commit is contained in:
@ -864,7 +864,7 @@ static vector<const Variation<T>*> FindVarsWithWithout(const vector<const Variat
|
||||
/// This is useful for finding variations without certain characteristics since it's not possible
|
||||
/// to query the CPU C++ code at runtime.
|
||||
/// </summary>
|
||||
/// <param name="stringVec">The vector of variation pointers to search</param>
|
||||
/// <param name="vars">The vector of variation pointers to search</param>
|
||||
/// <param name="stringVec">The vector of strings to search for</param>
|
||||
/// <param name="findAll">True to find all variations which don't match any strings, false to break after the first non-match is found.</param>
|
||||
/// <returns>A vector of pointers to variations whose OpenCL string did not match any string in stringVec</returns>
|
||||
@ -887,6 +887,32 @@ static vector<const Variation<T>*> FindVarsWithout(const vector<const Variation<
|
||||
|
||||
return vec;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check whether a file exists, and optionally if it's not empty.
|
||||
/// </summary>
|
||||
/// <param name="filename">The full path and file name to check for</param>
|
||||
/// <param name="notempty">Whether to only return true if the file is found and is not empty. Default: true.</param>
|
||||
/// <returns>True if the file was found and optionally not empty, else false.</returns>
|
||||
static bool FileExists(const string& filename, bool notempty = true)
|
||||
{
|
||||
try
|
||||
{
|
||||
ifstream ifs;
|
||||
ifs.exceptions(ifstream::failbit);
|
||||
ifs.open(filename, ios::binary | ios::ate);
|
||||
|
||||
if (notempty)
|
||||
return ifs.tellg() > 0;//Ensure it exists and wasn't empty.
|
||||
else
|
||||
return true;
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
Reference in New Issue
Block a user