summaryrefslogtreecommitdiffstats
path: root/logic/InstanceFactory.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2013-11-04 02:53:05 +0100
committerPetr Mrázek <peterix@gmail.com>2013-11-04 02:53:05 +0100
commitbb7e8985f6d189de0acac6a1c3033cb16378c1fb (patch)
tree7c2e88c7184a7f5acf5e7a03be5c5f0bf6904113 /logic/InstanceFactory.cpp
parentd6e4fb29713d6ce55b092c0e22412f6121e7f516 (diff)
downloadMultiMC-bb7e8985f6d189de0acac6a1c3033cb16378c1fb.tar
MultiMC-bb7e8985f6d189de0acac6a1c3033cb16378c1fb.tar.gz
MultiMC-bb7e8985f6d189de0acac6a1c3033cb16378c1fb.tar.lz
MultiMC-bb7e8985f6d189de0acac6a1c3033cb16378c1fb.tar.xz
MultiMC-bb7e8985f6d189de0acac6a1c3033cb16378c1fb.zip
Reformat and (slightly) decruft all the things.
Diffstat (limited to 'logic/InstanceFactory.cpp')
-rw-r--r--logic/InstanceFactory.cpp31
1 files changed, 16 insertions, 15 deletions
diff --git a/logic/InstanceFactory.cpp b/logic/InstanceFactory.cpp
index e64d22ca..e1f1f202 100644
--- a/logic/InstanceFactory.cpp
+++ b/logic/InstanceFactory.cpp
@@ -30,7 +30,7 @@
#include <setting.h>
#include "pathutils.h"
-#include <logger/QsLog.h>
+#include "logger/QsLog.h"
InstanceFactory InstanceFactory::loader;
@@ -129,19 +129,20 @@ InstanceFactory::InstCreateError InstanceFactory::copyInstance(BaseInstance *&ne
return InstanceFactory::CantCreateDir;
}
auto error = loadInstance(newInstance, instDir);
- switch(error)
+ switch (error)
{
- case NoLoadError:
- return NoCreateError;
- case UnknownLoadError:
- {
- rootDir.removeRecursively();
- return UnknownCreateError;
- }
- case NotAnInstance:
- {
- rootDir.removeRecursively();
- return CantCreateDir;
- }
- };
+ case NoLoadError:
+ return NoCreateError;
+ case UnknownLoadError:
+ {
+ rootDir.removeRecursively();
+ return UnknownCreateError;
+ }
+ case NotAnInstance:
+ {
+ rootDir.removeRecursively();
+ return CantCreateDir;
+ }
+ }
+ ;
}