mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 00:34:59 +01:00
globally remove all trailing whitespace from ardour code base.
Paul Davis was responsible for introducing almost all of this.
This commit is contained in:
parent
297e80e020
commit
4dc63966f0
774 changed files with 7919 additions and 7919 deletions
|
|
@ -58,7 +58,7 @@ template<class T> inline T WUMinMax(const T &Smallest, const T &Biggest, const T
|
|||
#include <math.h>
|
||||
|
||||
#ifndef __GNUC__
|
||||
#define __abs(x) abs(x)
|
||||
#define __abs(x) abs(x)
|
||||
#define __labs(x) labs(x)
|
||||
#define __fabs(x) fabs(x)
|
||||
#endif
|
||||
|
|
@ -87,8 +87,8 @@ template<class T> inline T WUMinMax(const T &Smallest, const T &Biggest, const T
|
|||
// log2: on Windows there's no proper definition for log2, whereas on other platform there is.
|
||||
#ifndef WUlog2
|
||||
#if defined(PLATFORM_WINDOWS)
|
||||
#define WUlog2(x) (kdOneOverLog2 * log10((x)))
|
||||
#else
|
||||
#define WUlog2(x) (kdOneOverLog2 * log10((x)))
|
||||
#else
|
||||
#define WUlog2(x) log2(x)
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
#include "BasicTypes/WUDefines.h"
|
||||
#include "BasicTypes/WUTypes.h"
|
||||
|
||||
namespace wvNS {
|
||||
namespace wvNS {
|
||||
// a wraper for Microseconds function from Timer.h
|
||||
class DllExport UMicroseconds
|
||||
{
|
||||
|
|
@ -62,7 +62,7 @@ public:
|
|||
UMicroseconds& operator+=(const TimeKeeper in_timeToAdd) {theTime += in_timeToAdd; return *this;}
|
||||
|
||||
UMicroseconds& ReadTime();
|
||||
|
||||
|
||||
TimeKeeper GetNativeTime() const {return theTime;}
|
||||
operator uint64_t () {return static_cast<uint64_t>(theTime);}
|
||||
operator double () const {return static_cast<const double>(theTime);}
|
||||
|
|
@ -120,5 +120,5 @@ inline void MicrosecondDelay(double amt)
|
|||
} while ((now.MicroSeconds() - than.MicroSeconds()) < amt);
|
||||
}
|
||||
|
||||
} // namespace wvNS {
|
||||
} // namespace wvNS {
|
||||
#endif //#ifndef __UMicroseconds_h__
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ public:
|
|||
if (in_index < m_MaxFixedStringLength)
|
||||
return m_begin[in_index];
|
||||
else
|
||||
return m_begin[m_MaxFixedStringLength]; // in_index was too big
|
||||
return m_begin[m_MaxFixedStringLength]; // in_index was too big
|
||||
}
|
||||
|
||||
char& operator[](const pos_t in_index)
|
||||
|
|
@ -106,7 +106,7 @@ public:
|
|||
if (in_index < m_MaxFixedStringLength)
|
||||
return m_begin[in_index];
|
||||
else
|
||||
return m_begin[m_MaxFixedStringLength]; // in_index was too big
|
||||
return m_begin[m_MaxFixedStringLength]; // in_index was too big
|
||||
}
|
||||
|
||||
inline size_t resize(const size_t in_newSize)
|
||||
|
|
@ -236,7 +236,7 @@ public:
|
|||
*m_end++ = *curr_char++;
|
||||
|
||||
#if kEnableDebug == 1
|
||||
if (curr_char < in_chars_end) // if there wasn't enough room for some appended chars
|
||||
if (curr_char < in_chars_end) // if there wasn't enough room for some appended chars
|
||||
{
|
||||
m_begin[0] = '@'; // mark the string as overflowed
|
||||
}
|
||||
|
|
@ -244,20 +244,20 @@ public:
|
|||
*m_end = '\0';
|
||||
}
|
||||
|
||||
// append from a char* in_count chars, (no \0 is required to terminate the input string)
|
||||
// append from a char* in_count chars, (no \0 is required to terminate the input string)
|
||||
inline void append(const char* in_chars_begin, const size_t in_count)
|
||||
{
|
||||
append(in_chars_begin, in_chars_begin + in_count);
|
||||
}
|
||||
|
||||
// assign from a char* in_count chars, (no \0 is required to terminate the input string)
|
||||
// assign from a char* in_count chars, (no \0 is required to terminate the input string)
|
||||
inline void assign(const char* in_chars_begin, const size_t in_count)
|
||||
{
|
||||
clear();
|
||||
append(in_chars_begin, in_chars_begin + in_count);
|
||||
}
|
||||
|
||||
// assign from a char* , (a \0 is required to terminate the input string)
|
||||
// assign from a char* , (a \0 is required to terminate the input string)
|
||||
inline void assign(const char* in_chars_ptr)
|
||||
{
|
||||
clear();
|
||||
|
|
@ -349,7 +349,7 @@ public:
|
|||
*m_end++ = *pSource++;
|
||||
|
||||
#if kEnableDebug == 1
|
||||
if (*pSource != '\0') // if there wasn't enough room for some appended chars
|
||||
if (*pSource != '\0') // if there wasn't enough room for some appended chars
|
||||
{
|
||||
m_begin[0] = '@'; // mark the string as overflowed
|
||||
}
|
||||
|
|
@ -379,7 +379,7 @@ public:
|
|||
WCFixedStringBase& operator<<(const size_t in_uint) {
|
||||
return operator<<(static_cast<unsigned long long>(in_uint));
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
// WCFixedStringBase& operator<<(const unsigned char in_uint) {
|
||||
// return operator<<(static_cast<const unsigned long long>(in_uint));
|
||||
// }
|
||||
|
|
@ -392,13 +392,13 @@ public:
|
|||
WCFixedStringBase& operator<<(const unsigned int in_uint) {
|
||||
return operator<<(static_cast<uint64_t>(in_uint));
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
//
|
||||
#if defined(PLATFORM_WINDOWS) || defined(__linux__) // both 32 & 64 bit
|
||||
WCFixedStringBase& operator<<(const unsigned long in_uint) {
|
||||
return operator<<(static_cast<uint64_t>(in_uint));
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
WCFixedStringBase& operator<<(const long long in_int)
|
||||
{
|
||||
|
|
@ -514,7 +514,7 @@ public:
|
|||
pos_t retVal = npos;
|
||||
const char* pCurrChar = m_end;
|
||||
|
||||
while (pCurrChar != m_begin)
|
||||
while (pCurrChar != m_begin)
|
||||
{
|
||||
--pCurrChar;
|
||||
if (*pCurrChar == in_char_to_find)
|
||||
|
|
@ -523,15 +523,15 @@ public:
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
|
||||
pos_t find(const char* in_chars_to_find, const pos_t in_start_from = 0) const
|
||||
{
|
||||
pos_t retVal = npos;
|
||||
size_t to_find_size = ::strlen(in_chars_to_find);
|
||||
|
||||
|
||||
if (to_find_size > 0 && to_find_size <= size() && in_start_from < size())
|
||||
{
|
||||
const char* pCurrChar = m_begin + in_start_from;
|
||||
|
|
@ -543,19 +543,19 @@ public:
|
|||
retVal = (pCurrChar - m_begin);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
++pCurrChar;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
|
||||
pos_t rfind(const char* in_chars_to_find) const
|
||||
{
|
||||
pos_t retVal = npos;
|
||||
size_t to_find_size = ::strlen(in_chars_to_find);
|
||||
|
||||
|
||||
if (to_find_size > 0 && to_find_size <= size())
|
||||
{
|
||||
const char* pCurrChar = m_end - to_find_size;
|
||||
|
|
@ -567,19 +567,19 @@ public:
|
|||
retVal = (pCurrChar - m_begin);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
--pCurrChar;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
|
||||
pos_t find_case_insensitive(const char* in_chars_to_find, const pos_t in_start_from = 0) const
|
||||
{
|
||||
pos_t retVal = npos;
|
||||
size_t to_find_size = ::strlen(in_chars_to_find);
|
||||
|
||||
|
||||
if (to_find_size > 0 && to_find_size <= size() && in_start_from < size())
|
||||
{
|
||||
const char* pCurrChar = m_begin + in_start_from;
|
||||
|
|
@ -591,20 +591,20 @@ public:
|
|||
if (tolower(*(pCurrChar+i)) != tolower(in_chars_to_find[i]))
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if (i == to_find_size)
|
||||
{
|
||||
retVal = (pCurrChar - m_begin);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
++pCurrChar;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
|
||||
pos_t find_first_of(const char* in_possibe_chars_to_find, const pos_t in_start_from = 0) const
|
||||
{
|
||||
pos_t retVal = npos;
|
||||
|
|
@ -698,7 +698,7 @@ public:
|
|||
bool retVal = ((size() - strlen(in_end_text)) == where) || (0 == ::strlen(in_end_text));
|
||||
return retVal;
|
||||
}
|
||||
|
||||
|
||||
size_t replace(const char in_look_for, const char in_replace_with)
|
||||
{
|
||||
size_t retVal = 0;
|
||||
|
|
@ -770,11 +770,11 @@ public:
|
|||
const char* end_buffer = out_buffer + (WUMin<size_t>(in_buffer_size - 1, m_end - m_begin));
|
||||
while (cur_buffer < end_buffer)
|
||||
*cur_buffer++ = *cur_fixed++;
|
||||
|
||||
|
||||
*cur_buffer = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected:
|
||||
~WCFixedStringBase() {}
|
||||
|
||||
|
|
@ -799,7 +799,7 @@ template<size_t kMaxFixedStringLength> class DllExport WCFixedString : public WC
|
|||
{
|
||||
public:
|
||||
|
||||
inline WCFixedString() :
|
||||
inline WCFixedString() :
|
||||
WCFixedStringBase(m_fixedString, kMaxFixedStringLength)
|
||||
{
|
||||
}
|
||||
|
|
@ -889,7 +889,7 @@ typedef WCFixedString<511> WCFixedString511;
|
|||
typedef WCFixedString<1023> WCFixedString1023;
|
||||
typedef WCFixedString<2047> WCFixedString2047;
|
||||
|
||||
template<size_t kSizeOfFirst, size_t kSizeOfSecond>
|
||||
template<size_t kSizeOfFirst, size_t kSizeOfSecond>
|
||||
class WCFixedStringPair : public std::pair< WCFixedString<kSizeOfFirst>, WCFixedString<kSizeOfSecond> >
|
||||
{
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -44,11 +44,11 @@ const WTErr eNotJustANumber = -13; //!< expected a number and found one but
|
|||
const WTErr eNegativeNumber = -14; //!< expected a positive number and found a negative
|
||||
const WTErr eTimeOut = -15; //!< something timed out
|
||||
const WTErr eCoreAudioFailed = -16; //!< Error in a core audio call
|
||||
const WTErr eSomeThingInitailzedTwice = -17;
|
||||
const WTErr eGenerateHelpInfo = -18;
|
||||
const WTErr eOutOfRangeNumber = -19;
|
||||
const WTErr eMacOnlyCode = -20;
|
||||
const WTErr eWinOnlyCode = -21;
|
||||
const WTErr eSomeThingInitailzedTwice = -17;
|
||||
const WTErr eGenerateHelpInfo = -18;
|
||||
const WTErr eOutOfRangeNumber = -19;
|
||||
const WTErr eMacOnlyCode = -20;
|
||||
const WTErr eWinOnlyCode = -21;
|
||||
const WTErr eAppLaunchFailed = -22; //!< failed to launch an application
|
||||
const WTErr eAppTerminateFailed = -23; //!< failed to terminate an application
|
||||
const WTErr eAppReturnedError = -24; //!< Non zero exit code from application
|
||||
|
|
@ -57,7 +57,7 @@ const WTErr eNotEmpty = -26; //!< Something was expected to be
|
|||
const WTErr eAsioFailed = -27;
|
||||
|
||||
// File Manager errors
|
||||
const WTErr eFMNoSuchVolume = -1001;
|
||||
const WTErr eFMNoSuchVolume = -1001;
|
||||
const WTErr eFMFileNotFound = -1002;
|
||||
const WTErr eFMFileAllreadyExists = -1003;
|
||||
const WTErr eFMAllreadyOpenWithWritePerm = -1004;
|
||||
|
|
@ -71,8 +71,8 @@ const WTErr eFMReadFailed = -1011;
|
|||
const WTErr eFMIllegalPathRef = -1012;
|
||||
const WTErr eFMFileNotOpened = -1013;
|
||||
const WTErr eFMFileSizeTooBig = -1014;
|
||||
const WTErr eFMNoSuchDomain = -1015;
|
||||
const WTErr eFMNoSuchSystemFolder = -1016;
|
||||
const WTErr eFMNoSuchDomain = -1015;
|
||||
const WTErr eFMNoSuchSystemFolder = -1016;
|
||||
const WTErr eFMWrongParameters = -1017;
|
||||
const WTErr eFMIsNotAFolder = -1018;
|
||||
const WTErr eFMIsAFolder = -1019;
|
||||
|
|
@ -113,7 +113,7 @@ const WTErr eNotAValidApplication = -2012;
|
|||
|
||||
// Resource Manager errors
|
||||
const WTErr eRMResNotFound = -3000;
|
||||
const WTErr eRMResExists = -3001; //!< a resource exist even though it's not expected to
|
||||
const WTErr eRMResExists = -3001; //!< a resource exist even though it's not expected to
|
||||
const WTErr eRMContainerNotFound = -3002; //!< The container was not found in the list of containers
|
||||
const WTErr eRMResRefNotFound = -3003; //!< The resRef was not found in container's resource list
|
||||
const WTErr eRMInvalidResRef = -3004;
|
||||
|
|
@ -155,8 +155,8 @@ const WTErr eMemObjNotInitialized = -4004;
|
|||
const WTErr eMemBuffTooShort = -4005; //!< the buffer in question did not have enough space for the operation
|
||||
const WTErr eInstanciationFailed = -4006;
|
||||
const WTErr eMemAddressSpaceError = -4007; //!< memory falls outside the legal address space
|
||||
const WTErr eMemBadPointer = -4008;
|
||||
const WTErr eMemOutOfMemory = -4009;
|
||||
const WTErr eMemBadPointer = -4008;
|
||||
const WTErr eMemOutOfMemory = -4009;
|
||||
|
||||
// XML Errors
|
||||
const WTErr eXMLParserFailed = -6001;
|
||||
|
|
@ -168,24 +168,24 @@ const WTErr eXMLElementIncomplete = -6006; //!< XML parser did not complete bu
|
|||
const WTErr eXMLAttribMissing = -6007;
|
||||
|
||||
// Preset errors
|
||||
const WTErr ePresetFileProblem = -7860;
|
||||
const WTErr eInvalidFileFormatProblem = -7861;
|
||||
const WTErr ePresetLockedProblem = -7862;
|
||||
const WTErr ePresetInfoNotFound = -7863;
|
||||
const WTErr eDuplicatePluginSpecificTag = -7959;
|
||||
const WTErr ePluginSpecifcNotExisting = -7960;
|
||||
const WTErr eBuffSizeToSmall = -7961;
|
||||
const WTErr eCreatingPopupWhereAnItemExists = -7962;
|
||||
const WTErr eDeletePluginSpecifcFailed = -7963;
|
||||
const WTErr eFactoryPresetNumOutOfRange = -7964;
|
||||
const WTErr eNoFactoryPresets = -7965;
|
||||
const WTErr eLoadPresetToPlugin_vec_empty = -7966;
|
||||
const WTErr eFactoryPresetNotFound = -7967;
|
||||
const WTErr eCantCreateUserPrefFile = -7968;
|
||||
const WTErr eDataFormatNotSupported = -7969;
|
||||
const WTErr eCantLoadProcessFunction = -7970;
|
||||
const WTErr eIllegalChunkIndex = -7971;
|
||||
const WTErr eIllegalChunkID = -7972;
|
||||
const WTErr ePresetFileProblem = -7860;
|
||||
const WTErr eInvalidFileFormatProblem = -7861;
|
||||
const WTErr ePresetLockedProblem = -7862;
|
||||
const WTErr ePresetInfoNotFound = -7863;
|
||||
const WTErr eDuplicatePluginSpecificTag = -7959;
|
||||
const WTErr ePluginSpecifcNotExisting = -7960;
|
||||
const WTErr eBuffSizeToSmall = -7961;
|
||||
const WTErr eCreatingPopupWhereAnItemExists = -7962;
|
||||
const WTErr eDeletePluginSpecifcFailed = -7963;
|
||||
const WTErr eFactoryPresetNumOutOfRange = -7964;
|
||||
const WTErr eNoFactoryPresets = -7965;
|
||||
const WTErr eLoadPresetToPlugin_vec_empty = -7966;
|
||||
const WTErr eFactoryPresetNotFound = -7967;
|
||||
const WTErr eCantCreateUserPrefFile = -7968;
|
||||
const WTErr eDataFormatNotSupported = -7969;
|
||||
const WTErr eCantLoadProcessFunction = -7970;
|
||||
const WTErr eIllegalChunkIndex = -7971;
|
||||
const WTErr eIllegalChunkID = -7972;
|
||||
const WTErr eIllegalChunkVersion = -7973;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright (C) 2014 John Emmas
|
||||
Copyright (C) 2014 John Emmas
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue