code style cleanups (after floessie's feedback)

This commit is contained in:
Alberto Griggio
2017-03-06 09:00:13 +01:00
parent f7f4575c54
commit a1a042e9ea
3 changed files with 28 additions and 20 deletions

View File

@@ -20,13 +20,14 @@
#include "options.h"
#include "toolpanel.h"
#include "guiutils.h"
#include "dynamicprofile.h"
ProfileStore profileStore;
using namespace rtengine;
using namespace rtengine::procparams;
ProfileStore::ProfileStore () : parseMutex(nullptr), storeState(STORESTATE_NOTINITIALIZED), internalDefaultProfile(nullptr), internalDefaultEntry(nullptr), internalDynamicEntry(nullptr)
ProfileStore::ProfileStore () : parseMutex(nullptr), storeState(STORESTATE_NOTINITIALIZED), internalDefaultProfile(nullptr), internalDefaultEntry(nullptr), internalDynamicEntry(nullptr), dynamicRules(new std::vector<DynamicProfileRule>())
{
internalDefaultProfile = new AutoPartialProfile();
internalDefaultProfile->set(true);
@@ -42,7 +43,7 @@ bool ProfileStore::init ()
storeState = STORESTATE_BEINGINITIALIZED;
parseMutex = new MyMutex();
_parseProfiles ();
loadDynamicProfileRules(dynamicRules);
loadDynamicProfileRules(*dynamicRules);
storeState = STORESTATE_INITIALIZED;
}
@@ -506,6 +507,20 @@ void ProfileStore::dumpFolderList()
printf("\n");
}
const std::vector<DynamicProfileRule> &ProfileStore::getDynamicProfileRules() const
{
return *dynamicRules;
}
void ProfileStore::setDynamicProfileRules(const std::vector<DynamicProfileRule> &r)
{
*dynamicRules = r;
}
ProfileStoreEntry::ProfileStoreEntry() : label(""), type(PSET_FOLDER), parentFolderId(0), folderId(0) {}
ProfileStoreEntry::ProfileStoreEntry(Glib::ustring label, PSEType type, unsigned short parentFolder, unsigned short folder) : label(label), type(type), parentFolderId(parentFolder), folderId(folder) {}