Skip to content

Commit

Permalink
Removed trailing whitespace from all *.?pp files
Browse files Browse the repository at this point in the history
  • Loading branch information
Grumbel committed Aug 12, 2014
1 parent bd47623 commit a8057c3
Show file tree
Hide file tree
Showing 189 changed files with 704 additions and 704 deletions.
10 changes: 5 additions & 5 deletions src/addon/addon.cpp
Expand Up @@ -63,7 +63,7 @@ void
Addon::parse(const Reader& lisp)
{
try {
lisp.get("kind", kind);
lisp.get("kind", kind);
lisp.get("title", title);
lisp.get("author", author);
lisp.get("license", license);
Expand Down Expand Up @@ -97,7 +97,7 @@ void
Addon::write(lisp::Writer& writer) const
{
writer.start_list("supertux-addoninfo");
if (kind != "") writer.write("kind", kind);
if (kind != "") writer.write("kind", kind);
if (title != "") writer.write("title", title);
if (author != "") writer.write("author", author);
if (license != "") writer.write("license", license);
Expand All @@ -107,14 +107,14 @@ Addon::write(lisp::Writer& writer) const
writer.end_list("supertux-addoninfo");
}

void
void
Addon::write(std::string fname) const
{
lisp::Writer writer(fname);
write(writer);
}

bool
bool
Addon::operator==(Addon addon2) const
{
std::string s1 = this->get_md5();
Expand All @@ -125,7 +125,7 @@ Addon::operator==(Addon addon2) const
if (this->title != addon2.title) return false;
if (this->author != addon2.author) return false;
if (this->kind != addon2.kind) return false;
return true;
return true;
}

/* EOF */
6 changes: 3 additions & 3 deletions src/addon/addon.hpp
Expand Up @@ -69,7 +69,7 @@ class Addon
void write(std::string fname) const;

/**
* Checks if Add-on is the same as given one.
* Checks if Add-on is the same as given one.
* If available, checks MD5 sum, else relies on kind, author and title alone.
*/
bool operator==(Addon addon2) const;
Expand All @@ -85,8 +85,8 @@ class Addon
author(),
license(),
http_url(),
suggested_filename(),
installed_physfs_filename(),
suggested_filename(),
installed_physfs_filename(),
installed_absolute_filename(),
stored_md5(),
installed(),
Expand Down
22 changes: 11 additions & 11 deletions src/addon/addon_manager.cpp
Expand Up @@ -135,10 +135,10 @@ AddonManager::check_online()
if(!addons_lisp) throw std::runtime_error("Downloaded file is not an Add-on list");

lisp::ListIterator iter(addons_lisp);
while(iter.next())
while(iter.next())
{
const std::string& token = iter.item();
if(token != "supertux-addoninfo")
if(token != "supertux-addoninfo")
{
log_warning << "Unknown token '" << token << "' in Add-on list" << std::endl;
continue;
Expand All @@ -148,20 +148,20 @@ AddonManager::check_online()
addon->installed = false;
addon->loaded = false;

// make sure the list of known Add-ons does not already contain this one
// make sure the list of known Add-ons does not already contain this one
bool exists = false;
for (std::vector<Addon*>::const_iterator i = addons.begin(); i != addons.end(); i++) {
if (**i == *addon) {
exists = true;
break;
exists = true;
break;
}
}

if (exists)
if (exists)
{
// do nothing
}
else if (addon->suggested_filename.find_first_not_of("match.quiz-proxy_gwenblvdjfks0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ") != std::string::npos)
else if (addon->suggested_filename.find_first_not_of("match.quiz-proxy_gwenblvdjfks0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ") != std::string::npos)
{
// make sure the Add-on's file name does not contain weird characters
log_warning << "Add-on \"" << addon->title << "\" contains unsafe file name. Skipping." << std::endl;
Expand Down Expand Up @@ -244,7 +244,7 @@ AddonManager::install(Addon* addon)
if (addon->get_md5() != addon->stored_md5) {
addon->installed = false;
PHYSFS_delete(fileName.c_str());
std::string why = "MD5 checksums differ";
std::string why = "MD5 checksums differ";
throw std::runtime_error("Downloading Add-on failed: " + why);
}

Expand Down Expand Up @@ -413,7 +413,7 @@ AddonManager::load_addons()
addon->loaded = true;
addons.push_back(addon);

// check if the Addon is disabled
// check if the Addon is disabled
if (std::find(ignored_addon_filenames.begin(), ignored_addon_filenames.end(), fileName) != ignored_addon_filenames.end()) {
unload(addon);
}
Expand All @@ -431,13 +431,13 @@ AddonManager::load_addons()
void
AddonManager::read(const Reader& lisp)
{
lisp.get("disabled-addons", ignored_addon_filenames);
lisp.get("disabled-addons", ignored_addon_filenames);
}

void
AddonManager::write(lisp::Writer& writer)
{
writer.write("disabled-addons", ignored_addon_filenames);
writer.write("disabled-addons", ignored_addon_filenames);
}

/* EOF */
14 changes: 7 additions & 7 deletions src/addon/md5.cpp
Expand Up @@ -12,8 +12,8 @@
// implied warranty of any kind.
//
// The translators/modifiers do not claim:
// (1) that MD5 will do what you think it does;
// (2) that this translation/ modification is accurate; or
// (1) that MD5 will do what you think it does;
// (2) that this translation/ modification is accurate; or
// (3) that this software is "merchantible."
//
// based on:
Expand All @@ -26,20 +26,20 @@
// is identified as the "RSA Data Security, Inc. MD5 Message-Digest
// Algorithm" in all material mentioning or referencing this software
// or this function.
//
//
// License is also granted to make and use derivative works provided
// that such works are identified as "derived from the RSA Data
// Security, Inc. MD5 Message-Digest Algorithm" in all material
// mentioning or referencing the derived work.
//
//
// RSA Data Security, Inc. makes no representations concerning either
// the merchantability of this software or the suitability of this
// software for any particular purpose. It is provided "as is"
// without express or implied warranty of any kind.
//
//
// These notices must be retained in any copies of any part of this
// documentation and/or software.
//
//

#include "addon/md5.hpp"

Expand Down Expand Up @@ -127,7 +127,7 @@ MD5::MD5(FILE *file) :
finalize ();
}

MD5::MD5(std::istream& stream) :
MD5::MD5(std::istream& stream) :
finalized()
{
init(); // must called by all constructors
Expand Down
16 changes: 8 additions & 8 deletions src/addon/md5.hpp
Expand Up @@ -12,8 +12,8 @@
// implied warranty of any kind.
//
// The translators/modifiers do not claim:
// (1) that MD5 will do what you think it does;
// (2) that this translation/ modification is accurate; or
// (1) that MD5 will do what you think it does;
// (2) that this translation/ modification is accurate; or
// (3) that this software is "merchantible."
//
// based on:
Expand All @@ -26,31 +26,31 @@
// is identified as the "RSA Data Security, Inc. MD5 Message-Digest
// Algorithm" in all material mentioning or referencing this software
// or this function.
//
//
// License is also granted to make and use derivative works provided
// that such works are identified as "derived from the RSA Data
// Security, Inc. MD5 Message-Digest Algorithm" in all material
// mentioning or referencing the derived work.
//
//
// RSA Data Security, Inc. makes no representations concerning either
// the merchantability of this software or the suitability of this
// software for any particular purpose. It is provided "as is"
// without express or implied warranty of any kind.
//
//
// These notices must be retained in any copies of any part of this
// documentation and/or software.
//
//

#ifndef HEADER_SUPERTUX_ADDON_MD5_HPP
#define HEADER_SUPERTUX_ADDON_MD5_HPP

#include <fstream>
#include <stdint.h>

class MD5
class MD5
{
public:
MD5();
MD5();
MD5(uint8_t* string); /**< digest string, finalize */
MD5(std::istream& stream); /**< digest stream, finalize */
MD5(FILE *file); /**< digest file, close, finalize */
Expand Down
2 changes: 1 addition & 1 deletion src/audio/ogg_sound_file.cpp
Expand Up @@ -23,7 +23,7 @@ OggSoundFile::OggSoundFile(PHYSFS_file* file, double loop_begin, double loop_at)
vorbis_file(),
loop_begin(),
loop_at(),
normal_buffer_loop()
normal_buffer_loop()
{
this->file = file;

Expand Down
2 changes: 1 addition & 1 deletion src/audio/sound_file.cpp
Expand Up @@ -47,7 +47,7 @@ SoundFile* load_music_file(const std::string& filename)
music->get("file", raw_music_file);
music->get("loop-begin", loop_begin);
music->get("loop-at", loop_at);

if(loop_begin < 0) {
throw SoundError("can't loop from negative value");
}
Expand Down
8 changes: 4 additions & 4 deletions src/audio/sound_manager.cpp
Expand Up @@ -28,9 +28,9 @@
#include "util/log.hpp"

SoundManager::SoundManager() :
device(0),
context(0),
sound_enabled(false),
device(0),
context(0),
sound_enabled(false),
buffers(),
sources(),
update_list(),
Expand All @@ -56,7 +56,7 @@ SoundManager::SoundManager() :
} catch(std::exception& e) {
if(context != NULL) {
alcDestroyContext(context);
context = NULL;
context = NULL;
}
if(device != NULL) {
alcCloseDevice(device);
Expand Down
4 changes: 2 additions & 2 deletions src/audio/stream_sound_source.cpp
Expand Up @@ -21,8 +21,8 @@
#include "util/log.hpp"

StreamSoundSource::StreamSoundSource() :
file(0),
fade_state(NoFading),
file(0),
fade_state(NoFading),
fade_start_time(),
fade_time(),
looping(false)
Expand Down
2 changes: 1 addition & 1 deletion src/badguy/angrystone.cpp
Expand Up @@ -27,7 +27,7 @@ static const float ATTACK_TIME = 1;
static const float RECOVER_TIME = .5;

AngryStone::AngryStone(const Reader& reader) :
BadGuy(reader, "images/creatures/angrystone/angrystone.sprite"),
BadGuy(reader, "images/creatures/angrystone/angrystone.sprite"),
attackDirection(),
oldWallDirection(),
timer(),
Expand Down
18 changes: 9 additions & 9 deletions src/badguy/badguy.hpp
Expand Up @@ -53,7 +53,7 @@ class BadGuy : public MovingSprite
/** Set the badguy to kill/falling state, which makes him falling of
the screen (his sprite is turned upside-down) */
virtual void kill_fall();

/** Call this, if you use custom kill_fall() or kill_squashed(GameObject& object) */
virtual void run_dead_script();

Expand Down Expand Up @@ -131,7 +131,7 @@ class BadGuy : public MovingSprite

/** called immediately before the first call to initialize */
virtual void initialize();

/** called when the badguy has been activated. (As a side effect the
dir variable might have been changed so that it faces towards
the player. */
Expand Down Expand Up @@ -185,22 +185,22 @@ class BadGuy : public MovingSprite
bool is_active();

/** changes colgroup_active. Also calls set_group when badguy is in STATE_ACTIVE */
void set_colgroup_active(CollisionGroup group);
void set_colgroup_active(CollisionGroup group);

private:
void try_activate();

protected:
Physic physic;

public:
public:
/** Count this badguy to the statistics? This value should not be
changed during runtime. */
bool countMe;

protected:
/** true if initialize() has already been called */
bool is_initialized;
bool is_initialized;

Vector start_position;

Expand All @@ -220,18 +220,18 @@ class BadGuy : public MovingSprite

/** true if state was STATE_ACTIVE at the beginning of the last call
to update() */
bool is_active_flag;
bool is_active_flag;

Timer state_timer;

/** true if we touched something solid from above and
update_on_ground_flag was called last frame */
bool on_ground_flag;
bool on_ground_flag;

/** floor normal stored the last time when update_on_ground_flag was
called and we touched something solid from above */
Vector floor_normal;
Vector floor_normal;

/** CollisionGroup the badguy should be in while active */
CollisionGroup colgroup_active;

Expand Down
6 changes: 3 additions & 3 deletions src/badguy/bomb.cpp
Expand Up @@ -22,9 +22,9 @@
#include "supertux/sector.hpp"

Bomb::Bomb(const Vector& pos, Direction dir, std::string custom_sprite /*= "images/creatures/mr_bomb/mr_bomb.sprite"*/ ) :
BadGuy( pos, dir, custom_sprite ),
BadGuy( pos, dir, custom_sprite ),
state(),
grabbed(false),
grabbed(false),
grabber(NULL),
ticking()
{
Expand Down Expand Up @@ -83,7 +83,7 @@ Bomb::explode()
// Bomb class.
if (grabber != NULL) {
Player* player = dynamic_cast<Player*>(grabber);

if (player)
player->stop_grabbing();
}
Expand Down
2 changes: 1 addition & 1 deletion src/badguy/bomb.hpp
Expand Up @@ -21,7 +21,7 @@
#include "badguy/badguy.hpp"
#include "object/portable.hpp"

class Bomb : public BadGuy,
class Bomb : public BadGuy,
public Portable
{
public:
Expand Down

0 comments on commit a8057c3

Please sign in to comment.