Remove unnecessary new line characters from log calls (#9237)

This commit is contained in:
Ted John 2019-05-12 12:48:56 +01:00 committed by Michael Steenbeek
parent 616fdfd96e
commit 15cb3e1889
11 changed files with 15 additions and 15 deletions

View File

@ -265,7 +265,7 @@ namespace OpenRCT2::Ui
static int32_t Execute(const std::string& command, std::string* output = nullptr)
{
# ifndef __EMSCRIPTEN__
log_verbose("executing \"%s\"...\n", command.c_str());
log_verbose("executing \"%s\"...", command.c_str());
FILE* fpipe = popen(command.c_str(), "r");
if (fpipe == nullptr)
{

View File

@ -143,7 +143,7 @@ namespace OpenRCT2::Ui
private:
static int32_t Execute(const std::string& command, std::string* output = nullptr)
{
log_verbose("executing \"%s\"...\n", command.c_str());
log_verbose("executing \"%s\"...", command.c_str());
FILE* fpipe = popen(command.c_str(), "r");
if (fpipe == nullptr)
{

View File

@ -279,7 +279,7 @@ AtlasTextureInfo TextureCache::AllocateImage(int32_t imageWidth, int32_t imageHe
int32_t atlasSize = (int32_t)powf(2, (float)Atlas::CalculateImageSizeOrder(imageWidth, imageHeight));
# ifdef DEBUG
log_verbose("new texture atlas #%d (size %d) allocated\n", atlasIndex, atlasSize);
log_verbose("new texture atlas #%d (size %d) allocated", atlasIndex, atlasSize);
# endif
_atlases.emplace_back(atlasIndex, atlasSize);

View File

@ -125,7 +125,7 @@ struct GameStateSnapshots : public IGameStateSnapshots
{
snapshot.SerialiseSprites(get_sprite(0), MAX_SPRITES, true);
// log_info("Snapshot size: %u bytes\n", (uint32_t)snapshot.storedSprites.GetLength());
// log_info("Snapshot size: %u bytes", (uint32_t)snapshot.storedSprites.GetLength());
}
virtual const GameStateSnapshot_t* GetLinkedSnapshot(uint32_t tick) const override final

View File

@ -302,7 +302,7 @@ public:
map_invalidate_tile_full(floor2(previousSegmentX, 32), floor2(previousSegmentY, 32));
if (tileElement == nullptr)
{
log_error("No surface found\n");
log_error("No surface found");
res->Error = GA_ERROR::UNKNOWN;
res->ErrorMessage = STR_NONE;
return res;

View File

@ -65,7 +65,7 @@ const constexpr auto ror64 = ror<uint64_t>;
#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))
# include <unistd.h>
# define STUB() log_warning("Function %s at %s:%d is a stub.\n", __PRETTY_FUNCTION__, __FILE__, __LINE__)
# define STUB() log_warning("Function %s at %s:%d is a stub.", __PRETTY_FUNCTION__, __FILE__, __LINE__)
# define _strcmpi _stricmp
# define _stricmp(x, y) strcasecmp((x), (y))
# define _strnicmp(x, y, n) strncasecmp((x), (y), (n))

View File

@ -140,7 +140,7 @@ static opt::optional<std::string> screenshot_get_next_path()
auto screenshotDirectory = screenshot_get_directory();
if (!platform_ensure_directory_exists(screenshotDirectory.c_str()))
{
log_error("Unable to save screenshots in OpenRCT2 screenshot directory.\n");
log_error("Unable to save screenshots in OpenRCT2 screenshot directory.");
return {};
}
@ -164,7 +164,7 @@ static opt::optional<std::string> screenshot_get_next_path()
}
}
log_error("You have too many saved screenshots saved at exactly the same date and time.\n");
log_error("You have too many saved screenshots saved at exactly the same date and time.");
return {};
};

View File

@ -539,7 +539,7 @@ bool Network::BeginClient(const std::string& host, uint16_t port)
mode = NETWORK_MODE_CLIENT;
log_info("Connecting to %s:%u\n", host.c_str(), port);
log_info("Connecting to %s:%u", host.c_str(), port);
_host = host;
_port = port;

View File

@ -149,7 +149,7 @@ void virtual_floor_invalidate()
return;
}
log_verbose("Min: %d %d, Max: %d %d\n", min_position.x, min_position.y, max_position.x, max_position.y);
log_verbose("Min: %d %d, Max: %d %d", min_position.x, min_position.y, max_position.x, max_position.y);
// Invalidate new region if coordinates are set.
if (min_position.x != std::numeric_limits<int16_t>::max() && min_position.y != std::numeric_limits<int16_t>::max()

View File

@ -170,7 +170,7 @@ bool platform_lock_single_instance()
// Create new mutex
status = CreateMutex(nullptr, FALSE, SINGLE_INSTANCE_MUTEX_NAME);
if (status == nullptr)
log_error("unable to create mutex\n");
log_error("unable to create mutex");
return true;
}

View File

@ -115,7 +115,7 @@ public:
auto chunkReader = SawyerChunkReader(stream);
chunkReader.ReadChunk(&_s6.header, sizeof(_s6.header));
log_verbose("saved game classic_flag = 0x%02x\n", _s6.header.classic_flag);
log_verbose("saved game classic_flag = 0x%02x", _s6.header.classic_flag);
if (isScenario)
{
if (_s6.header.type != S6_TYPE_SCENARIO)
@ -1434,7 +1434,7 @@ void load_from_sv6(const char* path)
{
gErrorType = ERROR_TYPE_FILE_LOAD;
gErrorStringId = STR_GAME_SAVE_FAILED;
log_error("Error loading: %s\n", loadError.what());
log_error("Error loading: %s", loadError.what());
}
catch (const std::exception&)
{
@ -1466,13 +1466,13 @@ void load_from_sc6(const char* path)
{
gErrorType = ERROR_TYPE_FILE_LOAD;
gErrorStringId = STR_GAME_SAVE_FAILED;
log_error("Error loading: %s\n", loadError.what());
log_error("Error loading: %s", loadError.what());
}
catch (const IOException& loadError)
{
gErrorType = ERROR_TYPE_FILE_LOAD;
gErrorStringId = STR_GAME_SAVE_FAILED;
log_error("Error loading: %s\n", loadError.what());
log_error("Error loading: %s", loadError.what());
}
catch (const std::exception&)
{