Skip to content

Commit

Permalink
Remove describe*_versions() functions, supersed by library_versions_r…
Browse files Browse the repository at this point in the history
…eport()

font::manager::init() had a call to the font::describe_versions()
function I just dropped since there's little point in having that line
there when one can just run wesnoth --version to get the full table now.
  • Loading branch information
irydacea committed Jul 9, 2015
1 parent 077c66f commit 6ee6698
Show file tree
Hide file tree
Showing 9 changed files with 2 additions and 112 deletions.
15 changes: 0 additions & 15 deletions src/font.cpp
Expand Up @@ -358,19 +358,6 @@ static void clear_fonts()

namespace font {

std::string describe_versions()
{
std::stringstream ss;

ss << "Compiled with Cairo version: " << CAIRO_VERSION_STRING << std::endl;
ss << "Running with Cairo version: " << cairo_version_string() << std::endl;

ss << "Compiled with Pango version: " << PANGO_VERSION_STRING << std::endl;
ss << "Running with Pango version: " << pango_version_string() << std::endl;

return ss.str();
}

manager::manager()
{
const int res = TTF_Init();
Expand Down Expand Up @@ -400,8 +387,6 @@ void manager::update_font_path() const

void manager::init() const
{
LOG_FT << describe_versions() << std::endl;

#ifdef CAIRO_HAS_FT_FONT
if (!FcConfigAppFontAddDir(FcConfigGetCurrent(),
reinterpret_cast<const FcChar8 *>((game_config::path + "/fonts").c_str())))
Expand Down
2 changes: 0 additions & 2 deletions src/font.hpp
Expand Up @@ -26,8 +26,6 @@ class t_string;

namespace font {

std::string describe_versions();

//object which initializes and destroys structures needed for fonts
struct manager {
manager();
Expand Down
21 changes: 0 additions & 21 deletions src/image.cpp
Expand Up @@ -1281,27 +1281,6 @@ bool save_image(const surface & surf, const std::string & filename)
return SDL_SaveBMP(surf, filename.c_str()) == 0;
}

std::string describe_versions()
{
std::stringstream ss;

SDL_version compile_version;
SDL_IMAGE_VERSION(&compile_version);

ss << "Compiled with SDL_image version: "
<< static_cast<int> (compile_version.major) << "."
<< static_cast<int> (compile_version.minor) << "."
<< static_cast<int> (compile_version.patch) << "\n";

const SDL_version *link_version = IMG_Linked_Version();
ss << "Running with SDL_image version: "
<< static_cast<int> (link_version->major) << "."
<< static_cast<int> (link_version->minor) << "."
<< static_cast<int> (link_version->patch) << "\n";

return ss.str();
}

bool update_from_preferences()
{
gui2::tadvanced_graphics_options::SCALING_ALGORITHM algo = gui2::tadvanced_graphics_options::SCALING_ALGORITHM::LINEAR;
Expand Down
2 changes: 0 additions & 2 deletions src/image.hpp
Expand Up @@ -246,8 +246,6 @@ namespace image {
void precache_file_existence(const std::string& subdir = "");
bool precached_file_exists(const std::string& file);

std::string describe_versions();

/// initialize any private data, e.g. algorithm choices from preferences
bool update_from_preferences();

Expand Down
21 changes: 0 additions & 21 deletions src/network.cpp
Expand Up @@ -1203,25 +1203,4 @@ statistics get_receive_stats(connection handle)
return result;
}

std::string describe_versions()
{
std::stringstream ss;

SDL_version compile_version;
SDL_NET_VERSION(&compile_version);

ss << "Compiled with SDL_net version: "
<< static_cast<int> (compile_version.major) << "."
<< static_cast<int> (compile_version.minor) << "."
<< static_cast<int> (compile_version.patch) << "\n";

const SDL_version *link_version = SDLNet_Linked_Version();
ss << "Running with SDL_net version: "
<< static_cast<int> (link_version->major) << "."
<< static_cast<int> (link_version->minor) << "."
<< static_cast<int> (link_version->patch) << "\n";

return ss.str();
}

} // end namespace network
1 change: 0 additions & 1 deletion src/network.hpp
Expand Up @@ -305,7 +305,6 @@ extern unsigned int ping_timeout;
/** Minimum interval between pings. */
const int ping_interval = 30;

std::string describe_versions();
} // network namespace


Expand Down
21 changes: 0 additions & 21 deletions src/sound.cpp
Expand Up @@ -901,25 +901,4 @@ void set_UI_volume(int vol)
}
}

std::string describe_versions()
{
std::stringstream ss;

SDL_version compile_version;
SDL_MIXER_VERSION(&compile_version);

ss << "Compiled with SDL_mixer version: "
<< static_cast<int> (compile_version.major) << "."
<< static_cast<int> (compile_version.minor) << "."
<< static_cast<int> (compile_version.patch) << "\n";

const SDL_version *link_version = Mix_Linked_Version();
ss << "Running with SDL_mixer version: "
<< static_cast<int> (link_version->major) << "."
<< static_cast<int> (link_version->minor) << "."
<< static_cast<int> (link_version->patch) << "\n";

return ss.str();
}

} // end of sound namespace
2 changes: 0 additions & 2 deletions src/sound.hpp
Expand Up @@ -22,8 +22,6 @@ class config;

namespace sound {

std::string describe_versions();

enum channel_group {
NULL_CHANNEL = -1,
SOUND_SOURCES = 0,
Expand Down
29 changes: 2 additions & 27 deletions src/wesnoth.cpp
Expand Up @@ -17,6 +17,7 @@
#include "about.hpp"
#include "addon/manager.hpp"
#include "addon/manager_ui.hpp"
#include "build_info.hpp"
#include "commandline_options.hpp" // for commandline_options, etc
#include "config.hpp" // for config, config::error, etc
#include "cursor.hpp" // for set, CURSOR_TYPE::NORMAL, etc
Expand Down Expand Up @@ -330,27 +331,6 @@ static void handle_preprocess_command(const commandline_options& cmdline_opts)
std::cerr << "preprocessing finished. Took "<< SDL_GetTicks() - startTime << " ticks.\n";
}

static std::string describe_SDL_versions()
{
SDL_version compiled;

#ifdef SDL_VERSION
SDL_VERSION(&compiled);
std::stringstream ss;
ss << "Compiled with SDL version "
<< static_cast<int> (compiled.major) << "." << static_cast<int> (compiled.minor) << "." << static_cast<int> (compiled.patch) << " \n";
#endif

#ifdef SDL_GetVersion
SDL_version linked;
SDL_GetVersion(&linked);
ss << "Linked with SDL version "
<< static_cast<int> (linked.major) << "." << static_cast<int> (linked.minor) << "." << static_cast<int> (linked.patch) << " .\n";
#endif

return ss.str();
}

/** Process commandline-arguments */
static int process_command_args(const commandline_options& cmdline_opts) {

Expand Down Expand Up @@ -471,12 +451,7 @@ static int process_command_args(const commandline_options& cmdline_opts) {
}
if(cmdline_opts.version) {
std::cout << "Battle for Wesnoth" << " " << game_config::version << "\n\n";
std::cout << "Compiled with Boost version: " << BOOST_LIB_VERSION << "\n";
std::cout << font::describe_versions();
std::cout << describe_SDL_versions();
std::cout << sound::describe_versions();
std::cout << network::describe_versions();
std::cout << image::describe_versions();
std::cout << "Library versions:\n" << game_config::library_versions_report();
return 0;
}

Expand Down

0 comments on commit 6ee6698

Please sign in to comment.