Removed now unused parameter.
This commit is contained in:
parent
bef011d04f
commit
99a9556fba
8 changed files with 11 additions and 10 deletions
|
@ -253,7 +253,7 @@ namespace {
|
|||
read_compressed(data, *binary_stream);
|
||||
|
||||
scoped_ostream gzip_stream = ostream_file((**itor)["filename"]);
|
||||
config_writer writer(*gzip_stream, true, "",compress_level_);
|
||||
config_writer writer(*gzip_stream, true, compress_level_);
|
||||
writer.write(data);
|
||||
}
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ namespace game_config {
|
|||
{
|
||||
scoped_ostream stream = ostream_file(path);
|
||||
const bool gzip = true;
|
||||
config_writer writer(*stream,gzip,"",game_config::cache_compression_level);
|
||||
config_writer writer(*stream, gzip, game_config::cache_compression_level);
|
||||
writer.write(cfg);
|
||||
}
|
||||
void config_cache::write_file(std::string path, const preproc_map& defines_map)
|
||||
|
@ -120,7 +120,7 @@ namespace game_config {
|
|||
}
|
||||
scoped_ostream stream = ostream_file(path);
|
||||
const bool gzip = true;
|
||||
config_writer writer(*stream,gzip,"",game_config::cache_compression_level);
|
||||
config_writer writer(*stream, gzip, game_config::cache_compression_level);
|
||||
|
||||
// write all defines to stream;
|
||||
// call foreach define is: second.write(config_writer,first);
|
||||
|
|
|
@ -928,7 +928,7 @@ void save_game(const game_state& gamestate)
|
|||
}
|
||||
|
||||
scoped_ostream os(open_save_game(filename));
|
||||
config_writer out(*os, preferences::compress_saves(), PACKAGE);
|
||||
config_writer out(*os, preferences::compress_saves());
|
||||
write_game(out, gamestate);
|
||||
finish_save_game(out, gamestate, gamestate.label);
|
||||
}
|
||||
|
|
|
@ -347,7 +347,7 @@ bool receive_with_timeout(TCPsocket s, char* buf, size_t nbytes,
|
|||
static void output_to_buffer(TCPsocket sock, const config& cfg, std::ostringstream& compressor, bool gzipped)
|
||||
{
|
||||
if(gzipped) {
|
||||
config_writer writer(compressor, true, "");
|
||||
config_writer writer(compressor, true);
|
||||
writer.write(cfg);
|
||||
} else {
|
||||
compression_schema *compress;
|
||||
|
|
|
@ -213,7 +213,7 @@ void replay::save_game(const std::string& label, const config& snapshot,
|
|||
}
|
||||
|
||||
scoped_ostream os(open_save_game(filename));
|
||||
config_writer out(*os, preferences::compress_saves(), PACKAGE);
|
||||
config_writer out(*os, preferences::compress_saves());
|
||||
::write_game(out, saveInfo_);
|
||||
finish_save_game(out, saveInfo_, saveInfo_.label);
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
#include "binary_or_text.hpp"
|
||||
#include "config.hpp"
|
||||
#include "wesconfig.h"
|
||||
#include "serialization/binary_wml.hpp"
|
||||
#include "serialization/parser.hpp"
|
||||
|
||||
|
@ -49,13 +50,13 @@ void write_possibly_compressed(std::ostream &out, config &cfg, bool compress)
|
|||
}
|
||||
|
||||
config_writer::config_writer(
|
||||
std::ostream &out, bool compress, const std::string &textdomain,int level) :
|
||||
std::ostream &out, bool compress, int level) :
|
||||
filter_(),
|
||||
out_ptr_(compress ? &filter_ : &out), //ternary indirection creates a temporary
|
||||
out_(*out_ptr_), //now MSVC will allow binding to the reference member
|
||||
compress_(compress),
|
||||
level_(0),
|
||||
textdomain_(textdomain)
|
||||
textdomain_(PACKAGE)
|
||||
{
|
||||
if(compress_) {
|
||||
if (level >=0)
|
||||
|
|
|
@ -44,7 +44,7 @@ void write_possibly_compressed(std::ostream &out, config &cfg, bool compress);
|
|||
class config_writer
|
||||
{
|
||||
public:
|
||||
config_writer(std::ostream &out, bool compress, const std::string &textdomain, int level = -1);
|
||||
config_writer(std::ostream &out, bool compress, int level = -1);
|
||||
|
||||
void write(const config &cfg);
|
||||
|
||||
|
|
|
@ -338,7 +338,7 @@ namespace wesnothd {
|
|||
}
|
||||
|
||||
scoped_ostream ban_file = ostream_file(filename_);
|
||||
config_writer writer(*ban_file, true, "");
|
||||
config_writer writer(*ban_file, true);
|
||||
writer.write(cfg);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue