mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-11 13:13:49 +01:00
libbitcoinconsensus: don't require any global constructors
These static objects are only used in once place, so declare them there instead.
This commit is contained in:
@@ -14,13 +14,13 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
/**
|
||||
* safeChars chosen to allow simple messages/URLs/email addresses, but avoid anything
|
||||
* even possibly remotely dangerous like & or >
|
||||
*/
|
||||
static string safeChars("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890 .,;_/:?@()");
|
||||
string SanitizeString(const string& str)
|
||||
{
|
||||
/**
|
||||
* safeChars chosen to allow simple messages/URLs/email addresses, but avoid anything
|
||||
* even possibly remotely dangerous like & or >
|
||||
*/
|
||||
static string safeChars("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890 .,;_/:?@()");
|
||||
string strResult;
|
||||
for (std::string::size_type i = 0; i < str.size(); i++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user