From 6516a6b7c19713de28db7142612f1c095e541317 Mon Sep 17 00:00:00 2001 From: Tannin Date: Sun, 17 Feb 2013 09:26:29 +0100 Subject: - moved shared and uibase libraries to namespaces - bugfix: the "fix mods" function was accessing the save game data incorrectly, causing a crash --- src/shared/skyriminfo.cpp | 43 +++++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 20 deletions(-) (limited to 'src/shared/skyriminfo.cpp') diff --git a/src/shared/skyriminfo.cpp b/src/shared/skyriminfo.cpp index f3043c28..6302cef3 100644 --- a/src/shared/skyriminfo.cpp +++ b/src/shared/skyriminfo.cpp @@ -1,22 +1,22 @@ -/* -Copyright (C) 2012 Sebastian Herbord. All rights reserved. - -This file is part of Mod Organizer. - -Mod Organizer is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -Mod Organizer is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with Mod Organizer. If not, see . -*/ - +/* +Copyright (C) 2012 Sebastian Herbord. All rights reserved. + +This file is part of Mod Organizer. + +Mod Organizer is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +Mod Organizer is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with Mod Organizer. If not, see . +*/ + #include "skyriminfo.h" #include "util.h" @@ -29,6 +29,8 @@ along with Mod Organizer. If not, see . #include #include +namespace MOShared { + SkyrimInfo::SkyrimInfo(const std::wstring &omoDirectory, const std::wstring &gameDirectory) : GameInfo(omoDirectory, gameDirectory) @@ -206,7 +208,7 @@ void SkyrimInfo::createProfile(const std::wstring &directory, bool useDefaults) source << getGameDirectory() << L"\\skyrim_default.ini"; } else { source << getMyGamesDirectory() << L"\\Skyrim"; - if (::FileExists(source.str(), L"skyrim.ini")) { + if (FileExists(source.str(), L"skyrim.ini")) { source << L"\\skyrim.ini"; } else { source.str(L""); @@ -276,3 +278,4 @@ std::vector SkyrimInfo::getExecutables() return result; } +} // namespace MOShared -- cgit v1.3.1