Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clang-tidy: remove pointless static #1611

Merged
merged 1 commit into from
May 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions src/actions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1911,16 +1911,16 @@ namespace {
#endif
#else
#if defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP)
static pthread_mutex_t cs = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
#else
static pthread_mutex_t cs = PTHREAD_MUTEX_INITIALIZER;
#endif
#endif
pthread_mutex_t cs = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
#else
pthread_mutex_t cs = PTHREAD_MUTEX_INITIALIZER;
#endif
#endif
#endif

static std::string temporaryPath()
{
static int count = 0 ;
std::string temporaryPath()
{
static int count = 0;

#if defined(_MSC_VER) || defined(__MINGW__)
EnterCriticalSection(&cs);
Expand Down Expand Up @@ -1948,7 +1948,7 @@ namespace {
#endif

return result;
}
}

int metacopy(const std::string& source,
const std::string& tgt,
Expand Down
4 changes: 2 additions & 2 deletions src/exiv2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@
namespace {

//! List of all command identifiers and corresponding strings
static const CmdIdAndString cmdIdAndString[] = {
const CmdIdAndString cmdIdAndString[] = {
{ add, "add" },
{ set, "set" },
{ del, "del" },
{ reg, "reg" },
{ invalidCmdId, "invalidCmd" } // End of list marker
{ invalidCmdId, "invalidCmd" }, // End of list marker
};

// Return a command Id for a command string
Expand Down
2 changes: 1 addition & 1 deletion src/preview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,7 @@ namespace {
return dest;
}

static const char encodeBase64Table[64 + 1] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
const char encodeBase64Table[64 + 1] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";

DataBuf decodeBase64(const std::string& src)
{
Expand Down