added missing file.

This commit is contained in:
techdragon.nguyen@gmail.com
2010-10-22 09:33:55 +00:00
parent 34bdfab36f
commit 1652308bfe
+7 -7
View File
@@ -730,23 +730,23 @@ int MTGDeck::remove(MTGCard * card){
} }
int MTGDeck::save() { int MTGDeck::save() {
return save( filename, false, meta_name, meta_desc ); return save( filename, false );
} }
int MTGDeck::save(string destFileName, bool useExpandedDescriptions, string deckTitle, string deckDesc){ int MTGDeck::save(string destFileName, bool useExpandedDescriptions){
string tmp = destFileName; string tmp = destFileName;
tmp.append(".tmp"); //not thread safe tmp.append(".tmp"); //not thread safe
std::ofstream file(tmp.c_str()); std::ofstream file(tmp.c_str());
char writer[512]; char writer[512];
if (file){ if (file){
DebugTrace("Saving Deck"); DebugTrace("Saving Deck: " << meta_name << " to " << destFileName );
if (deckTitle.size()){ if (meta_name.size()){
file << "#NAME:" << deckTitle << '\n'; file << "#NAME:" << meta_name << '\n';
} }
if (deckDesc.size()){ if (meta_desc.size()){
size_t found = 0; size_t found = 0;
string desc= deckDesc; string desc= meta_desc;
found = desc.find_first_of("\n"); found = desc.find_first_of("\n");
while(found != string::npos){ while(found != string::npos){
file << "#DESC:" << desc.substr(0,found+1); file << "#DESC:" << desc.substr(0,found+1);