Fix warnings

Semi-fix bug #6 (does not work if the zipfile was loaded from a directory)


git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1439 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
coppro
2010-03-04 01:46:04 +00:00
parent cf91f9c43b
commit 85854b1bd2
31 changed files with 93 additions and 71 deletions
+9 -8
View File
@@ -28,14 +28,14 @@ DECLARE_TYPEOF_NO_REV(IndexMap<FieldP COMMA ValueP>);
// ----------------------------------------------------------------------------- : Set
Set::Set()
: script_manager(new SetScriptManager(*this))
, vcs (new_intrusive<VCS>())
: vcs (new_intrusive<VCS>())
, script_manager(new SetScriptManager(*this))
{}
Set::Set(const GameP& game)
: game(game)
, script_manager(new SetScriptManager(*this))
, vcs (new_intrusive<VCS>())
, script_manager(new SetScriptManager(*this))
{
data.init(game->set_fields);
}
@@ -43,8 +43,8 @@ Set::Set(const GameP& game)
Set::Set(const StyleSheetP& stylesheet)
: game(stylesheet->game)
, stylesheet(stylesheet)
, script_manager(new SetScriptManager(*this))
, vcs (new_intrusive<VCS>())
, script_manager(new SetScriptManager(*this))
{
data.init(game->set_fields);
}
@@ -201,8 +201,11 @@ void Set::reflect_cards (Tag& tag) {
template <>
void Set::reflect_cards<Writer> (Writer& tag) {
// TODO: disable for zipfiles
if (true) {
// When writing to a directory, we write each card in a separate file.
// We don't do this in zipfiles because it leads to bloat.
if (isZipfile()) {
REFLECT(cards);
} else {
set<String> used;
FOR_EACH(card, cards) {
String filename = normalize_internal_filename(clean_filename(card->identification()));
@@ -222,8 +225,6 @@ void Set::reflect_cards<Writer> (Writer& tag) {
referenceFile(full_name);
REFLECT_N("include file", full_name);
}
} else {
REFLECT(cards);
}
}