Skip to content

Commit

Permalink
Fix mix of space vs. tab indentation.
Browse files Browse the repository at this point in the history
Most of the codebase seems to be using space indentation, so normalising
towards that.
  • Loading branch information
Freso committed Aug 26, 2014
1 parent a8fc456 commit a27b943
Show file tree
Hide file tree
Showing 8 changed files with 383 additions and 383 deletions.
10 changes: 5 additions & 5 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
*.dbproj merge=union

# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
4 changes: 2 additions & 2 deletions docs/LOOT Readme.html
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ <h3>0.6.0 - <i>05 July 2014</i></h3>
<li>Added: Command line parameter for selecting the game LOOT should run for.
<li>Added: Finnish translation.
<li>Removed: Support for Windows XP.
<li>Removed: Support for loading BOSS masterlists using the API. This was a leftover from when LOOT was BOSSv3 and backwards compatibility was an issue.
<li>Removed: Support for loading BOSS masterlists using the API. This was a leftover from when LOOT was BOSSv3 and backwards compatibility was an issue.
<li>Removed: The ability to open reports in an external browser. This was necessitated by the changes to report generation.
<li>Removed: The MSVC 2013 redistributable requirement.
<li>Removed: The "None Specified" language option is no longer available: English is the new default.
Expand All @@ -486,7 +486,7 @@ <h3>0.6.0 - <i>05 July 2014</i></h3>

<h3>0.5.0 - <i>31 March 2014</i></h3>
<ul>
<li>Initial release.
<li>Initial release.
</ul>

<script>
Expand Down
22 changes: 11 additions & 11 deletions docs/licenses/GNU GPL v2 (libgit2).txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

----------------------------------------------------------------------

LINKING EXCEPTION
LINKING EXCEPTION

In addition to the permissions in the GNU General Public License,
the authors give you unlimited permission to link the compiled
Expand All @@ -20,15 +20,15 @@

----------------------------------------------------------------------

GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991

Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

Preamble
Preamble

The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Expand Down Expand Up @@ -78,7 +78,7 @@ patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.

GNU GENERAL PUBLIC LICENSE
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. This License applies to any program or other work which contains
Expand Down Expand Up @@ -277,7 +277,7 @@ make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.

NO WARRANTY
NO WARRANTY

11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
Expand All @@ -299,9 +299,9 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.

END OF TERMS AND CONDITIONS
END OF TERMS AND CONDITIONS

How to Apply These Terms to Your New Programs
How to Apply These Terms to Your New Programs

If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
Expand Down Expand Up @@ -391,12 +391,12 @@ Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler
The priority queue implementation is based on code licensed under the
Apache 2.0 license:

Copyright 2010 Volkan Yazıcı <[email protected]>
Copyright 2006-2010 The Apache Software Foundation
Copyright 2010 Volkan Yazıcı <[email protected]>
Copyright 2006-2010 The Apache Software Foundation

The full text of the Apache 2.0 license is available at:

http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0

----------------------------------------------------------------------

Expand Down
4 changes: 2 additions & 2 deletions src/backend/generators.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ namespace YAML {
for (const auto &element: rhs) {
out << element;
}
out << EndSeq;
out << EndSeq;

return out;
return out;
}

template<class T, class Hash>
Expand Down
96 changes: 48 additions & 48 deletions src/backend/helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,58 +64,58 @@ namespace loot {
namespace lc = boost::locale;


/// REGEX expression definition
/// Each expression is composed of three parts:
/// 1. The marker string "version", "ver", "rev", "v" or "r"
/// 2. The version string itself.

const char* regex1 =
"^(?:\\bversion\\b[ ]*(?:[:.\\-]?)|\\brevision\\b(?:[:.\\-]?))[ ]*"
"((?:alpha|beta|test|debug)?\\s*[-0-9a-zA-Z._+]+\\s*(?:alpha|beta|test|debug)?\\s*(?:[0-9]*))$"
;

const char* regex2 =
"(?:\\bversion\\b(?:[ :]?)|\\brevision\\b(?:[:.\\-]?))[ ]*"
"([0-9][-0-9a-zA-Z._]+\\+?)"
;

const char* regex3 =
"(?:\\bver(?:[:.]?)|\\brev(?:[:.]?))\\s*"
"([0-9][-0-9a-zA-Z._]*\\+?)"
;

// Matches "Updated: <date>" for the Bashed patch
const char* regex4 =
"(?:Updated:)\\s*"
"([-0-9aAmMpP/ :]+)$"
;

// Matches isolated versions as last resort
const char* regex5 =
"(?:(?:\\bv|\\br)(?:\\s?)(?:[-.:])?(?:\\s*))"
"((?:(?:\\balpha\\b)?|(?:\\bbeta\\b)?)\\s*[0-9][-0-9a-zA-Z._]*\\+?)"
;

// Matches isolated versions as last resort
const char* regex6 =
"((?:(?:\\balpha\\b)?|(?:\\bbeta\\b)?)\\s*\\b[0-9][-0-9a-zA-Z._]*\\+?)$"
;

const char* regex7 =
"(^\\bmark\\b\\s*\\b[IVX0-9][-0-9a-zA-Z._+]*\\s*(?:alpha|beta|test|debug)?\\s*(?:[0-9]*)?)$"
;

/// Array used to try each of the expressions defined above using
/// an iteration for each of them.
/// REGEX expression definition
/// Each expression is composed of three parts:
/// 1. The marker string "version", "ver", "rev", "v" or "r"
/// 2. The version string itself.

const char* regex1 =
"^(?:\\bversion\\b[ ]*(?:[:.\\-]?)|\\brevision\\b(?:[:.\\-]?))[ ]*"
"((?:alpha|beta|test|debug)?\\s*[-0-9a-zA-Z._+]+\\s*(?:alpha|beta|test|debug)?\\s*(?:[0-9]*))$"
;

const char* regex2 =
"(?:\\bversion\\b(?:[ :]?)|\\brevision\\b(?:[:.\\-]?))[ ]*"
"([0-9][-0-9a-zA-Z._]+\\+?)"
;

const char* regex3 =
"(?:\\bver(?:[:.]?)|\\brev(?:[:.]?))\\s*"
"([0-9][-0-9a-zA-Z._]*\\+?)"
;

// Matches "Updated: <date>" for the Bashed patch
const char* regex4 =
"(?:Updated:)\\s*"
"([-0-9aAmMpP/ :]+)$"
;

// Matches isolated versions as last resort
const char* regex5 =
"(?:(?:\\bv|\\br)(?:\\s?)(?:[-.:])?(?:\\s*))"
"((?:(?:\\balpha\\b)?|(?:\\bbeta\\b)?)\\s*[0-9][-0-9a-zA-Z._]*\\+?)"
;

// Matches isolated versions as last resort
const char* regex6 =
"((?:(?:\\balpha\\b)?|(?:\\bbeta\\b)?)\\s*\\b[0-9][-0-9a-zA-Z._]*\\+?)$"
;

const char* regex7 =
"(^\\bmark\\b\\s*\\b[IVX0-9][-0-9a-zA-Z._+]*\\s*(?:alpha|beta|test|debug)?\\s*(?:[0-9]*)?)$"
;

/// Array used to try each of the expressions defined above using
/// an iteration for each of them.
regex version_checks[7] = {
regex(regex1, regex::ECMAScript | regex::icase),
regex(regex1, regex::ECMAScript | regex::icase),
regex(regex2, regex::ECMAScript | regex::icase),
regex(regex3, regex::ECMAScript | regex::icase),
regex(regex4, regex::ECMAScript | regex::icase),
regex(regex5, regex::ECMAScript | regex::icase), //This incorrectly identifies "OBSE v19" where 19 is any integer.
regex(regex6, regex::ECMAScript | regex::icase), //This is responsible for metallicow's false positive.
regex(regex7, regex::ECMAScript | regex::icase)
};
};

//////////////////////////////////////////////////////////////////////////
// Helper functions
Expand Down Expand Up @@ -263,10 +263,10 @@ namespace loot {
Construct(Language::polish);
else if (nameOrCode == Language(Language::brazilian_portuguese).Name() || nameOrCode == Language(Language::brazilian_portuguese).Locale())
Construct(Language::brazilian_portuguese);
else if (nameOrCode == Language(Language::finnish).Name() || nameOrCode == Language(Language::finnish).Locale())
Construct(Language::finnish);
else if (nameOrCode == Language(Language::finnish).Name() || nameOrCode == Language(Language::finnish).Locale())
Construct(Language::finnish);
else if (nameOrCode == Language(Language::german).Name() || nameOrCode == Language(Language::german).Locale())
Construct(Language::german);
Construct(Language::german);
else
Construct(Language::english);
}
Expand Down
2 changes: 1 addition & 1 deletion src/backend/helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
namespace loot {

/// Array used to try each of the expressions defined using
/// an iteration for each of them.
/// an iteration for each of them.
extern std::regex version_checks[7];

//////////////////////////////////////////////////////////////////////////
Expand Down
38 changes: 19 additions & 19 deletions src/backend/metadata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,12 +307,12 @@ namespace loot {
name = name.substr(0, name.length() - 6);
}

Plugin::Plugin(loot::Game& game, const std::string& n, const bool headerOnly)
Plugin::Plugin(loot::Game& game, const std::string& n, const bool headerOnly)
: name(n), enabled(true), priority(0), isMaster(false), crc(0), numOverrideRecords(0), _isPriorityExplicit(false) {

// Get data from file contents using libespm. Assumes libespm has already been initialised.
// Get data from file contents using libespm. Assumes libespm has already been initialised.
BOOST_LOG_TRIVIAL(trace) << name << ": " << "Opening with libespm...";
boost::filesystem::path filepath = game.DataPath() / name;
boost::filesystem::path filepath = game.DataPath() / name;

//In case the plugin is ghosted, but the extension already got trimmed.
if (!boost::filesystem::exists(filepath) && boost::filesystem::exists(filepath.string() + ".ghost"))
Expand Down Expand Up @@ -341,23 +341,23 @@ namespace loot {
}

BOOST_LOG_TRIVIAL(trace) << name << ": " << "Checking master flag.";
isMaster = file->isMaster(game.espm_settings);
isMaster = file->isMaster(game.espm_settings);

BOOST_LOG_TRIVIAL(trace) << name << ": " << "Getting masters.";
masters = file->getMasters();
masters = file->getMasters();

BOOST_LOG_TRIVIAL(trace) << name << ": " << "Number of masters: " << masters.size();

crc = file->crc;
game.crcCache.insert(pair<string, uint32_t>(n, crc));

BOOST_LOG_TRIVIAL(trace) << name << ": " << "Getting the FormIDs.";
vector<uint32_t> records = file->getFormIDs();
vector<uint32_t> records = file->getFormIDs();
vector<string> plugins = masters;
plugins.push_back(name);
for (const auto &record: records) {
for (const auto &record: records) {
FormID fid = FormID(plugins, record);
formIDs.insert(fid);
formIDs.insert(fid);
if (!boost::iequals(fid.Plugin(), name))
++numOverrideRecords;
}
Expand Down Expand Up @@ -409,7 +409,7 @@ namespace loot {
BOOST_LOG_TRIVIAL(trace) << name << ": " << "Extracted Bash Tag: " << tag;
tags.insert(Tag(tag));
}
}
}

void Plugin::MergeMetadata(const Plugin& plugin) {
BOOST_LOG_TRIVIAL(trace) << "Merging metadata for: " << name;
Expand Down Expand Up @@ -658,8 +658,8 @@ namespace loot {
}

const std::set<FormID>& Plugin::FormIDs() const {
return formIDs;
}
return formIDs;
}

bool Plugin::DoFormIDsOverlap(const Plugin& plugin) const {
//Basically std::set_intersection except with an early exit instead of an append to results.
Expand Down Expand Up @@ -700,17 +700,17 @@ namespace loot {
for (const auto &formID : formIDs) {
if (!boost::iequals(formID.Plugin(), name))
fidSubset.insert(formID);
}
return fidSubset;
}
return fidSubset;
}

std::vector<std::string> Plugin::Masters() const {
return masters;
}
std::vector<std::string> Plugin::Masters() const {
return masters;
}

bool Plugin::IsMaster() const {
return isMaster;
}
bool Plugin::IsMaster() const {
return isMaster;
}

std::string Plugin::Version() const {
return version;
Expand Down
Loading

0 comments on commit a27b943

Please sign in to comment.