Skip to content

Commit

Permalink
Fix trailing whitespace in lib/
Browse files Browse the repository at this point in the history
  • Loading branch information
past-due committed May 3, 2024
1 parent 248313a commit caa0c18
Show file tree
Hide file tree
Showing 17 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion lib/framework/debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ void _debugBacktrace(code_part part)
}
}
};
for (i = 1; i + 2 < num; ++i)
for (i = 1; i + 2 < num; ++i)
{
int status = -1;
char buf[1024];
Expand Down
2 changes: 1 addition & 1 deletion lib/ivis_opengl/gfx_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -814,7 +814,7 @@ bool gfx_api::context::loadTextureArrayLayerFromUncompressedImage(gfx_api::textu
}
return true;
};

if (!uploadMipLevel(&rootImage, 0))
{
return false;
Expand Down
4 changes: 2 additions & 2 deletions lib/ivis_opengl/gfx_api_gl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1169,7 +1169,7 @@ desc(createInfo.state_desc), vertex_buffer_desc(createInfo.attribute_description
fragmentShaderHeader = shaderVersionStr;
// OpenGL ES Shading Language - 4. Variables and Types - pp. 35-36
// https://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf?#page=41
//
//
// > The fragment language has no default precision qualifier for floating point types.
// > Hence for float, floating point vector and matrix variable declarations, either the
// > declaration must include a precision qualifier or the default float precision must
Expand Down Expand Up @@ -1535,7 +1535,7 @@ void gl_pipeline_state_object::getLocs(const std::vector<std::tuple<std::string,
debug(LOG_3D, "Missing expected sampler uniform: %s", std::get<0>(uniformSampler).c_str());
}
}

}

static std::unordered_set<std::string> getUniformNamesFromSource(const char* shaderContents)
Expand Down
2 changes: 1 addition & 1 deletion lib/ivis_opengl/pieblitfunc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ static void pie_DrawMultipleImages(const std::list<PieDrawImageRequest>& request

bool didEnableRect = false;
gfx_api::DrawImagePSO::get().bind();

for (auto& request : requests)
{
// The following is the equivalent of:
Expand Down
6 changes: 3 additions & 3 deletions lib/ivis_opengl/piefunc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ void pie_Skybox_Init()
float bottom = -1;

// Skybox looks like this from the side:
//
//
// _____ top, slightly narrower to give perspective
// / .
// / .
Expand All @@ -146,10 +146,10 @@ void pie_Skybox_Init()
// | |
// +-------+ bottom
// bottom cap ---^

// The skybox is shown from baseline to top. below the baseline, the color fades to black (if fog enabled - otherwise a color of the skybox bottom).
// We extended the skybox downwards to be able to paint more of the screen with fog.

float narrowCoordinate = 1 - narrowingOfTop;
const Vector3f
northWestBottom = Vector3f(-1, bottom, 1), // nw
Expand Down
4 changes: 2 additions & 2 deletions lib/ivis_opengl/textdraw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ struct TextShaper
# endif // USE_NEW_FRIBIDI_API

#endif // defined(WZ_FRIBIDI_ENABLED)

/* Fill the array of scripts with scripts of each character */
hb_unicode_funcs_t* funcs = hb_unicode_funcs_get_default();
for (int i = 0; i < codePoints_size; ++i)
Expand Down Expand Up @@ -986,7 +986,7 @@ struct TextShaper
run.endOffset - run.startOffset);
hb_buffer_set_flags(run.buffer, (hb_buffer_flags_t)(HB_BUFFER_FLAG_BOT | HB_BUFFER_FLAG_EOT));
std::array<hb_feature_t, 3> features = { {HBFeature::KerningOn, HBFeature::LigatureOn, HBFeature::CligOn} };

hb_shape(face.m_font, run.buffer, features.data(), static_cast<unsigned int>(features.size()));

run.glyphInfos = hb_buffer_get_glyph_infos(run.buffer, &run.glyphCount);
Expand Down
2 changes: 1 addition & 1 deletion lib/netplay/netplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4963,7 +4963,7 @@ bool NETjoinGame(const char *host, uint32_t port, const char *playername, const
socketBeginCompression(*bsocket);

uint8_t playerType = (!asSpectator) ? NET_JOIN_PLAYER : NET_JOIN_SPECTATOR;

if (bsocket == nullptr)
{
NETclose();
Expand Down
2 changes: 1 addition & 1 deletion lib/netplay/nettypes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1084,6 +1084,6 @@ void NETshutdownReplay()
delete gameQueues[MAX_CONNECTED_PLAYERS];
gameQueues[MAX_CONNECTED_PLAYERS] = nullptr;
}

bIsReplay = false;
}
2 changes: 1 addition & 1 deletion lib/sdl/cursors_sdl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1418,7 +1418,7 @@ SDL_Cursor *init_system_cursor32(CURSOR cur)
void wzSetCursor(CURSOR cur)
{
ASSERT(cur < CURSOR_MAX, "Specified cursor(%d) is over our limit of (%d)!", (int)cur, (int)CURSOR_MAX);

currentCursor = cur;
}

Expand Down
2 changes: 1 addition & 1 deletion lib/sdl/gfx_api_gl_sdl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ bool sdl_OpenGL_Impl::createGLContext()
debug(LOG_3D, "Failed to get value for SDL_GL_DEPTH_SIZE (%s)", SDL_GetError());
}
debug(LOG_3D, "Current value for SDL_GL_DEPTH_SIZE: (%d)", value);

if (SDL_GL_GetAttribute(SDL_GL_STENCIL_SIZE, &value) != 0)
{
debug(LOG_3D, "Failed to get value for SDL_GL_STENCIL_SIZE (%s)", SDL_GetError());
Expand Down
2 changes: 1 addition & 1 deletion lib/sound/cdaudio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ static bool cdAudio_OpenTrack(std::shared_ptr<const WZ_TRACK> track)

PlayList_SetCurrentSong(track);

cdStream = sound_PlayStream(filename.c_str(), cdAudio_CalculateTrackVolume(track),
cdStream = sound_PlayStream(filename.c_str(), cdAudio_CalculateTrackVolume(track),
[track](const AUDIO_STREAM*, const void*) { cdAudio_TrackFinished(track);}, nullptr);
if (cdStream == nullptr)
{
Expand Down
6 changes: 3 additions & 3 deletions lib/sound/codecs.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ class WZDecoder
WZDecoder &operator=(WZDecoder &&) = delete;

/** Decode all the data into a buffer.
* Note that the API is different from oggvorbis: opus takes in, and gives out *samples* not bytes
* Note that the API is different from oggvorbis: opus takes in, and gives out *samples* not bytes
* and we have to convert to little endian ourselves
*
*
* \param [out] buffer: preallocated buffer to hold decoded data, little-endian. Will *not* be freed, even on error.
* \param [in] bufferSize: takes buffer size in *bytes* as input, to be consistent with oggvorbis,
* \param [in] bufferSize: takes buffer size in *bytes* as input, to be consistent with oggvorbis,
* \returns how much bytes have been placed into buffer, or nullopt if error */
virtual optional<size_t> decode(uint8_t*, size_t) = 0;
virtual int64_t totalTime() const = 0;
Expand Down
2 changes: 1 addition & 1 deletion lib/sound/oggopus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ optional<size_t> WZOpusDecoder::decode(uint8_t* buffer, size_t bufferSize)
}
ASSERT(samples_per_chan >= 0, "Unexpected Opus error %i", samples_per_chan);
// convert to little endian
for (int si = 0; si < m_nchannels * samples_per_chan; si++)
for (int si = 0; si < m_nchannels * samples_per_chan; si++)
{
buffer[bufferOffset + 0] = (uint8_t)(pcm[si] & 0xFF);
buffer[bufferOffset + 1] = (uint8_t)(pcm[si] >> 8 & 0xFF);
Expand Down
2 changes: 1 addition & 1 deletion lib/sound/oggvorbis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ WZVorbisDecoder* WZVorbisDecoder::fromFilename(const char* fileName)
PHYSFS_close(fileHandle);
return nullptr;
}

long seekable = ov_seekable(ovf.get());
if (!seekable)
{
Expand Down
12 changes: 6 additions & 6 deletions lib/sound/openal_track.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ bool sound_QueueSamplePlaying()

/** Decodes *entirely* an opened OggVorbis file into an OpenAL buffer.
* This is used to play sound effects, not "music". Assumes .ogg file.
*
*
* \param psTrack pointer to object which will contain the final buffer
* \param PHYSFS_fileHandle file handle given by PhysicsFS to the opened file
* \return true on success
Expand Down Expand Up @@ -897,10 +897,10 @@ static int sound_fillNBuffers(ALuint* alBuffersIds, WZDecoder* decoder, size_t n
* \note You must _never_ manually free() the memory used by the returned
* pointer.
*/
AUDIO_STREAM *sound_PlayStream(const char* fileName,
float volume,
const std::function<void (const AUDIO_STREAM *, const void *)>& onFinished,
const void *user_data)
AUDIO_STREAM *sound_PlayStream(const char* fileName,
float volume,
const std::function<void (const AUDIO_STREAM *, const void *)>& onFinished,
const void *user_data)
{
if (!openal_initialized)
{
Expand Down Expand Up @@ -968,7 +968,7 @@ AUDIO_STREAM *sound_PlayStream(const char* fileName,
if (sound_GetError() != AL_NO_ERROR) { goto _error; }
// Copy the audio data into one of OpenAL's own buffers
ASSERT(bufferSize <= static_cast<size_t>(std::numeric_limits<ALsizei>::max()), "soundBuffer->size (%zu) exceeds ALsizei::max", bufferSize);

res = sound_fillNBuffers(alBuffersIds, decoder, buffer_count, bufferSize);
// Bail out if we didn't fill any buffers
if (res <= 0)
Expand Down
2 changes: 1 addition & 1 deletion lib/wzmaplib/include/wzmaplib/map_io.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class IOProvider
virtual bool makeDirectory(const std::string& directoryPath) = 0;

virtual const char* pathSeparator() const = 0;

// enumFunc receives each enumerated file, and returns true to continue enumeration, or false to shortcut / stop enumeration
virtual bool enumerateFiles(const std::string& basePath, const std::function<bool (const char* file)>& enumFunc);

Expand Down
2 changes: 1 addition & 1 deletion lib/wzmaplib/src/map_package.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ optional<LevelDetails> loadLevelDetails_LEV(const std::string& levelFile, IOProv
debug(pCustomLogger, LOG_WARNING, "LEV File Parse Error: `Syntax Error`: Received an unexpected token (prior to a `level` token): %s %s", command.c_str(), arg.c_str());
return;
}

if (command.compare("players") == 0)
{
int playersValue = 0;
Expand Down

0 comments on commit caa0c18

Please sign in to comment.