Skip to content

Commit

Permalink
scripted-diff: Remove trailing whitespaces
Browse files Browse the repository at this point in the history
-BEGIN VERIFY SCRIPT-

sed --in-place'' --regexp-extended 's/[[:space:]]+$//g' $(git grep -I --files-with-matches --extended-regexp '[[:space:]]+$' -- src test  ':!*.svg' ':!src/crypto/sha256_sse4*' ':!src/leveldb' ':!src/qt/locale' ':!src/secp256k1' ':!src/univalue')

-END VERIFY SCRIPT-
  • Loading branch information
promag committed Jul 24, 2018
1 parent 5f7575e commit 12dd101
Show file tree
Hide file tree
Showing 46 changed files with 152 additions and 152 deletions.
2 changes: 1 addition & 1 deletion src/Makefile.qt.include
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ if ENABLE_WALLET
BITCOIN_QT_CPP += $(BITCOIN_QT_WALLET_CPP)
endif

RES_IMAGES =
RES_IMAGES =

RES_MOVIES = $(wildcard $(srcdir)/qt/res/movies/spinner-*.png)

Expand Down
2 changes: 1 addition & 1 deletion src/addrman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ CAddrInfo CAddrMan::Select_(bool newOnly)

// Use a 50% chance for choosing between tried and new table entries.
if (!newOnly &&
(nTried > 0 && (nNew == 0 || RandomInt(2) == 0))) {
(nTried > 0 && (nNew == 0 || RandomInt(2) == 0))) {
// use a tried node
double fChanceFactor = 1.0;
while (1) {
Expand Down
4 changes: 2 additions & 2 deletions src/addrman.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ class CAddrInfo : public CAddress
//! the maximum number of tried addr collisions to store
#define ADDRMAN_SET_TRIED_COLLISION_SIZE 10

/**
* Stochastical (IP) address manager
/**
* Stochastical (IP) address manager
*/
class CAddrMan
{
Expand Down
2 changes: 1 addition & 1 deletion src/bloom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ bool CBloomFilter::IsRelevantAndUpdate(const CTransaction& tx)
const CTxOut& txout = tx.vout[i];
// Match if the filter contains any arbitrary script data element in any scriptPubKey in tx
// If this matches, also add the specific output that was matched.
// This means clients don't have to update the filter themselves when a new relevant tx
// This means clients don't have to update the filter themselves when a new relevant tx
// is discovered in order to find spending transactions, which avoids round-tripping and race conditions.
CScript::const_iterator pc = txout.scriptPubKey.begin();
std::vector<unsigned char> data;
Expand Down
4 changes: 2 additions & 2 deletions src/bloom.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ enum bloomflags
/**
* BloomFilter is a probabilistic filter which SPV clients provide
* so that we can filter the transactions we send them.
*
*
* This allows for significantly more efficient transaction and block downloads.
*
*
* Because bloom filters are probabilistic, a SPV node can increase the false-
* positive rate, making us send it transactions which aren't actually its,
* allowing clients to trade more bandwidth for more privacy by obfuscating which
Expand Down
4 changes: 2 additions & 2 deletions src/checkqueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
template <typename T>
class CCheckQueueControl;

/**
/**
* Queue for verifications that have to be performed.
* The verifications are represented by a type T, which must provide an
* operator(), returning a bool.
Expand Down Expand Up @@ -163,7 +163,7 @@ class CCheckQueue

};

/**
/**
* RAII-style controller object for a CCheckQueue that guarantees the passed
* queue is finished before continuing.
*/
Expand Down
4 changes: 2 additions & 2 deletions src/clientversion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ std::string FormatFullVersion()
return CLIENT_BUILD;
}

/**
* Format the subversion field according to BIP 14 spec (https://github.com/bitcoin/bips/blob/master/bip-0014.mediawiki)
/**
* Format the subversion field according to BIP 14 spec (https://github.com/bitcoin/bips/blob/master/bip-0014.mediawiki)
*/
std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector<std::string>& comments)
{
Expand Down
4 changes: 2 additions & 2 deletions src/coins.h
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ class CCoinsViewCache : public CCoinsViewBacked
protected:
/**
* Make mutable so that we can "fill the cache" even from Get-methods
* declared as "const".
* declared as "const".
*/
mutable uint256 hashBlock;
mutable CCoinsMap cacheCoins;
Expand Down Expand Up @@ -280,7 +280,7 @@ class CCoinsViewCache : public CCoinsViewBacked
//! Calculate the size of the cache (in bytes)
size_t DynamicMemoryUsage() const;

/**
/**
* Amount of bitcoins coming in to a transaction
* Note that lightweight clients may not know anything besides the hash of previous transactions,
* so may not be able to calculate this.
Expand Down
2 changes: 1 addition & 1 deletion src/consensus/tx_verify.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ unsigned int GetLegacySigOpCount(const CTransaction& tx);

/**
* Count ECDSA signature operations in pay-to-script-hash inputs.
*
*
* @param[in] mapInputs Map of previous transactions that have outputs we're spending
* @return maximum number of sigops required to validate this transaction's inputs
* @see CTransaction::FetchInputs
Expand Down
4 changes: 2 additions & 2 deletions src/core_read.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ static bool CheckTxScriptsSanity(const CMutableTransaction& tx)
return false;
}
}

return true;
}

Expand Down Expand Up @@ -140,7 +140,7 @@ bool DecodeHexTx(CMutableTransaction& tx, const std::string& hex_tx, bool try_no
// Fall through.
}
}

return false;
}

Expand Down
2 changes: 1 addition & 1 deletion src/httprpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ static void JSONErrorReply(HTTPRequest* req, const UniValue& objError, const Uni
//This function checks username and password against -rpcauth
//entries from config file.
static bool multiUserAuthorized(std::string strUserPass)
{
{
if (strUserPass.find(':') == std::string::npos) {
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/limitedmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class limitedmap
// since it is a constant time operation in C++11. For more details, see
// https://stackoverflow.com/questions/765148/how-to-remove-constness-of-const-iterator
iterator itTarget = map.erase(itIn, itIn);

if (itTarget == map.end())
return;
std::pair<rmap_iterator, rmap_iterator> itPair = rmap.equal_range(itTarget->second);
Expand Down
6 changes: 3 additions & 3 deletions src/qt/bitcoingui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -470,13 +470,13 @@ void BitcoinGUI::setClientModel(ClientModel *_clientModel)
}
#endif // ENABLE_WALLET
unitDisplayControl->setOptionsModel(_clientModel->getOptionsModel());

OptionsModel* optionsModel = _clientModel->getOptionsModel();
if(optionsModel)
{
// be aware of the tray icon disable state change reported by the OptionsModel object.
connect(optionsModel,SIGNAL(hideTrayIconChanged(bool)),this,SLOT(setTrayIconVisible(bool)));

// initialize the disable state of the tray icon with the current value in the model.
setTrayIconVisible(optionsModel->getHideTrayIcon());
}
Expand Down Expand Up @@ -1057,7 +1057,7 @@ void BitcoinGUI::setHDStatus(int hdEnabled)
labelWalletHDStatusIcon->setPixmap(platformStyle->SingleColorIcon(hdEnabled ? ":/icons/hd_enabled" : ":/icons/hd_disabled").pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE));
labelWalletHDStatusIcon->setToolTip(hdEnabled ? tr("HD key generation is <b>enabled</b>") : tr("HD key generation is <b>disabled</b>"));

// eventually disable the QLabel to set its opacity to 50%
// eventually disable the QLabel to set its opacity to 50%
labelWalletHDStatusIcon->setEnabled(hdEnabled);
}

Expand Down
2 changes: 1 addition & 1 deletion src/qt/bitcoingui.h
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ private Q_SLOTS:

/** Show progress dialog e.g. for verifychain */
void showProgress(const QString &title, int nProgress);

/** When hideTrayIcon setting is changed in OptionsModel hide or show the icon accordingly. */
void setTrayIconVisible(bool);

Expand Down
18 changes: 9 additions & 9 deletions src/qt/guiutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -381,12 +381,12 @@ bool openBitcoinConf()

/* Create the file */
boost::filesystem::ofstream configFile(pathConfig, std::ios_base::app);

if (!configFile.good())
return false;

configFile.close();

/* Open bitcoin.conf with the associated application */
return QDesktopServices::openUrl(QUrl::fromLocalFile(boostPathToQString(pathConfig)));
}
Expand Down Expand Up @@ -741,7 +741,7 @@ LSSharedFileListItemRef findStartupItemInList(LSSharedFileListRef list, CFURLRef
if (listSnapshot == nullptr) {
return nullptr;
}

// loop through the list of startup items and try to find the bitcoin app
for(int i = 0; i < CFArrayGetCount(listSnapshot); i++) {
LSSharedFileListItemRef item = (LSSharedFileListItemRef)CFArrayGetValueAtIndex(listSnapshot, i);
Expand Down Expand Up @@ -769,7 +769,7 @@ LSSharedFileListItemRef findStartupItemInList(LSSharedFileListRef list, CFURLRef
CFRelease(currentItemURL);
}
}

CFRelease(listSnapshot);
return nullptr;
}
Expand All @@ -780,7 +780,7 @@ bool GetStartOnSystemStartup()
if (bitcoinAppUrl == nullptr) {
return false;
}

LSSharedFileListRef loginItems = LSSharedFileListCreate(nullptr, kLSSharedFileListSessionLoginItems, nullptr);
LSSharedFileListItemRef foundItem = findStartupItemInList(loginItems, bitcoinAppUrl);

Expand All @@ -794,7 +794,7 @@ bool SetStartOnSystemStartup(bool fAutoStart)
if (bitcoinAppUrl == nullptr) {
return false;
}

LSSharedFileListRef loginItems = LSSharedFileListCreate(nullptr, kLSSharedFileListSessionLoginItems, nullptr);
LSSharedFileListItemRef foundItem = findStartupItemInList(loginItems, bitcoinAppUrl);

Expand All @@ -806,7 +806,7 @@ bool SetStartOnSystemStartup(bool fAutoStart)
// remove item
LSSharedFileListItemRemove(loginItems, foundItem);
}

CFRelease(bitcoinAppUrl);
return true;
}
Expand Down Expand Up @@ -967,7 +967,7 @@ void ClickableLabel::mouseReleaseEvent(QMouseEvent *event)
{
Q_EMIT clicked(event->pos());
}

void ClickableProgressBar::mouseReleaseEvent(QMouseEvent *event)
{
Q_EMIT clicked(event->pos());
Expand Down
4 changes: 2 additions & 2 deletions src/qt/guiutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,11 @@ namespace GUIUtil
protected:
void mouseReleaseEvent(QMouseEvent *event);
};

class ClickableProgressBar : public QProgressBar
{
Q_OBJECT

Q_SIGNALS:
/** Emitted when the progressbar is clicked. The relative mouse coordinates of the click are
* passed to the signal.
Expand Down
6 changes: 3 additions & 3 deletions src/qt/macdockiconhandler.mm
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@
bool dockClickHandler(id self,SEL _cmd,...) {
Q_UNUSED(self)
Q_UNUSED(_cmd)

s_instance->handleDockIconClickEvent();

// Return NO (false) to suppress the default OS X actions
return false;
}

void setupDockClickHandler() {
Class cls = objc_getClass("NSApplication");
id appInst = objc_msgSend((id)cls, sel_registerName("sharedApplication"));

if (appInst != nullptr) {
id delegate = objc_msgSend(appInst, sel_registerName("delegate"));
Class delClass = (Class)objc_msgSend(delegate, sel_registerName("class"));
Expand Down
2 changes: 1 addition & 1 deletion src/qt/macnotificationhandler.mm
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ - (NSString *)__bundleIdentifier
static MacNotificationHandler *s_instance = nullptr;
if (!s_instance) {
s_instance = new MacNotificationHandler();

Class aPossibleClass = objc_getClass("NSBundle");
if (aPossibleClass) {
// change NSBundle -bundleIdentifier method to return a correct bundle identifier
Expand Down
2 changes: 1 addition & 1 deletion src/qt/modaloverlay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ void ModalOverlay::tipUpdate(int count, const QDateTime& blockDate, double nVeri
ui->progressIncreasePerH->setText(QString::number(progressPerHour * 100, 'f', 2)+"%");

// show expected remaining time
if(remainingMSecs >= 0) {
if(remainingMSecs >= 0) {
ui->expectedTimeLeft->setText(GUIUtil::formatNiceTimeOffset(remainingMSecs / 1000.0));
} else {
ui->expectedTimeLeft->setText(QObject::tr("unknown"));
Expand Down
2 changes: 1 addition & 1 deletion src/qt/optionsdialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ private Q_SLOTS:
void on_openBitcoinConfButton_clicked();
void on_okButton_clicked();
void on_cancelButton_clicked();

void on_hideTrayIcon_stateChanged(int fState);

void togglePruneWarning(bool enabled);
Expand Down
2 changes: 1 addition & 1 deletion src/qt/optionsmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void OptionsModel::Init(bool resetSettings)
settings.setValue("fHideTrayIcon", false);
fHideTrayIcon = settings.value("fHideTrayIcon").toBool();
Q_EMIT hideTrayIconChanged(fHideTrayIcon);

if (!settings.contains("fMinimizeToTray"))
settings.setValue("fMinimizeToTray", false);
fMinimizeToTray = settings.value("fMinimizeToTray").toBool() && !fHideTrayIcon;
Expand Down
2 changes: 1 addition & 1 deletion src/qt/qvalidatedlineedit.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public Q_SLOTS:

Q_SIGNALS:
void validationDidChange(QValidatedLineEdit *validatedLineEdit);

private Q_SLOTS:
void markValid();
void checkValidity();
Expand Down
2 changes: 1 addition & 1 deletion src/qt/trafficgraphwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ void TrafficGraphWidget::paintEvent(QPaintEvent *)

const QString units = tr("KB/s");
const float yMarginText = 2.0;

// draw lines
painter.setPen(axisCol);
painter.drawText(XMARGIN, YMARGIN + h - h * val / fMax-yMarginText, QString("%1 %2").arg(val).arg(units));
Expand Down
2 changes: 1 addition & 1 deletion src/qt/walletview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ void WalletView::setBitcoinGUI(BitcoinGUI *gui)
// Pass through transaction notifications
connect(this, SIGNAL(incomingTransaction(QString,int,CAmount,QString,QString,QString,QString)), gui, SLOT(incomingTransaction(QString,int,CAmount,QString,QString,QString,QString)));

// Connect HD enabled state signal
// Connect HD enabled state signal
connect(this, SIGNAL(hdEnabledStatusChanged()), gui, SLOT(updateWalletStatus()));
}
}
Expand Down
10 changes: 5 additions & 5 deletions src/reverse_iterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

/**
* Template used for reverse iteration in C++11 range-based for loops.
*
*
* std::vector<int> v = {1, 2, 3, 4, 5};
* for (auto x : reverse_iterate(v))
* std::cout << x << " ";
Expand All @@ -15,21 +15,21 @@ template <typename T>
class reverse_range
{
T &m_x;

public:
explicit reverse_range(T &x) : m_x(x) {}

auto begin() const -> decltype(this->m_x.rbegin())
{
return m_x.rbegin();
}

auto end() const -> decltype(this->m_x.rend())
{
return m_x.rend();
}
};

template <typename T>
reverse_range<T> reverse_iterate(T &x)
{
Expand Down
Loading

0 comments on commit 12dd101

Please sign in to comment.