Remove describe*_versions() functions, supersed by library_versions_report()
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.
This commit is contained in:
parent
077c66fdc0
commit
6ee669803b
9 changed files with 2 additions and 112 deletions
15
src/font.cpp
15
src/font.cpp
|
@ -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();
|
||||
|
@ -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())))
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -305,7 +305,6 @@ extern unsigned int ping_timeout;
|
|||
/** Minimum interval between pings. */
|
||||
const int ping_interval = 30;
|
||||
|
||||
std::string describe_versions();
|
||||
} // network namespace
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -22,8 +22,6 @@ class config;
|
|||
|
||||
namespace sound {
|
||||
|
||||
std::string describe_versions();
|
||||
|
||||
enum channel_group {
|
||||
NULL_CHANNEL = -1,
|
||||
SOUND_SOURCES = 0,
|
||||
|
|
|
@ -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
|
||||
|
@ -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) {
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue