tdf#97966: Remove 'static' keywords
Change-Id: Id991cead4f01830eafd9cf8dd63b519ef07c9451 Reviewed-on: https://gerrit.libreoffice.org/23134 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
committed by
Stephan Bergmann
parent
018c6adf85
commit
9a13cff647
@@ -110,7 +110,7 @@ private:
|
||||
bool externCFunction;
|
||||
};
|
||||
|
||||
static const char * recommendedFix(clang::CastKind ck) {
|
||||
const char * recommendedFix(clang::CastKind ck) {
|
||||
switch(ck) {
|
||||
case CK_IntegralToPointer: return "reinterpret_cast";
|
||||
case CK_PointerToIntegral: return "reinterpret_cast";
|
||||
|
@@ -40,7 +40,7 @@ private:
|
||||
EState meState = EState::None;
|
||||
};
|
||||
|
||||
static const std::set<std::string> whitelist {
|
||||
const std::set<std::string> whitelist {
|
||||
"rtl::math::approxEqual",
|
||||
"(anonymous namespace)::doubleToString",
|
||||
"(anonymous namespace)::stringToDouble",
|
||||
@@ -95,7 +95,7 @@ bool FpComparison::ignore(FunctionDecl* function)
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool isZeroConstant(ASTContext& context, const Expr* expr)
|
||||
bool isZeroConstant(ASTContext& context, const Expr* expr)
|
||||
{
|
||||
if (!expr->getType()->isFloatingType()) {
|
||||
return false;
|
||||
|
@@ -79,11 +79,11 @@ public:
|
||||
bool VisitCallExpr(const CallExpr* decl);
|
||||
};
|
||||
|
||||
static bool startsWith(const std::string& rStr, const char* pSubStr) {
|
||||
bool startsWith(const std::string& rStr, const char* pSubStr) {
|
||||
return rStr.compare(0, strlen(pSubStr), pSubStr) == 0;
|
||||
}
|
||||
|
||||
static void addToInstantiatedSet(const std::string& s)
|
||||
void addToInstantiatedSet(const std::string& s)
|
||||
{
|
||||
// ignore stuff in the standard library, and UNO stuff we can't touch.
|
||||
if (startsWith(s, "rtl::") || startsWith(s, "sal::") || startsWith(s, "com::sun::")
|
||||
@@ -161,12 +161,12 @@ bool MergeClasses::VisitFunctionDecl(const FunctionDecl* decl)
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool startswith(const std::string& s, const std::string& prefix)
|
||||
bool startswith(const std::string& s, const std::string& prefix)
|
||||
{
|
||||
return s.rfind(prefix,0) == 0;
|
||||
}
|
||||
|
||||
static bool endswith(const std::string& s, const std::string& suffix)
|
||||
bool endswith(const std::string& s, const std::string& suffix)
|
||||
{
|
||||
return s.rfind(suffix) == (s.size()-suffix.size());
|
||||
}
|
||||
|
@@ -67,7 +67,7 @@ std::string StaticMethods::getFilename(SourceLocation loc)
|
||||
return compiler.getSourceManager().getFilename(spellingLocation);
|
||||
}
|
||||
|
||||
static bool startsWith(const std::string& rStr, const char* pSubStr) {
|
||||
bool startsWith(const std::string& rStr, const char* pSubStr) {
|
||||
return rStr.compare(0, strlen(pSubStr), pSubStr) == 0;
|
||||
}
|
||||
|
||||
|
@@ -44,7 +44,7 @@ private:
|
||||
char* mmappedData;
|
||||
};
|
||||
|
||||
static size_t getFilesize(const char* filename)
|
||||
size_t getFilesize(const char* filename)
|
||||
{
|
||||
struct stat st;
|
||||
stat(filename, &st);
|
||||
@@ -71,7 +71,7 @@ RemoveVirtuals::~RemoveVirtuals()
|
||||
close(mmapFD);
|
||||
}
|
||||
|
||||
static std::string niceName(const CXXMethodDecl* functionDecl)
|
||||
std::string niceName(const CXXMethodDecl* functionDecl)
|
||||
{
|
||||
std::string s =
|
||||
functionDecl->getParent()->getQualifiedNameAsString() + "::"
|
||||
|
@@ -68,7 +68,7 @@ private:
|
||||
std::string fullyQualifiedName(const FunctionDecl* functionDecl);
|
||||
};
|
||||
|
||||
static std::string niceName(const CXXMethodDecl* functionDecl)
|
||||
std::string niceName(const CXXMethodDecl* functionDecl)
|
||||
{
|
||||
std::string s =
|
||||
functionDecl->getParent()->getQualifiedNameAsString() + "::"
|
||||
|
@@ -44,7 +44,7 @@ private:
|
||||
char* mmappedData;
|
||||
};
|
||||
|
||||
static size_t getFilesize(const char* filename)
|
||||
size_t getFilesize(const char* filename)
|
||||
{
|
||||
struct stat st;
|
||||
stat(filename, &st);
|
||||
@@ -71,7 +71,7 @@ UnusedFieldsRemove::~UnusedFieldsRemove()
|
||||
close(mmapFD);
|
||||
}
|
||||
|
||||
static std::string niceName(const FieldDecl* fieldDecl)
|
||||
std::string niceName(const FieldDecl* fieldDecl)
|
||||
{
|
||||
std::string s = fieldDecl->getParent()->getQualifiedNameAsString() + " " +
|
||||
fieldDecl->getNameAsString();
|
||||
|
@@ -44,7 +44,7 @@ private:
|
||||
char* mmappedData;
|
||||
};
|
||||
|
||||
static size_t getFilesize(const char* filename)
|
||||
size_t getFilesize(const char* filename)
|
||||
{
|
||||
struct stat st;
|
||||
stat(filename, &st);
|
||||
@@ -71,7 +71,7 @@ UnusedMethodsRemove::~UnusedMethodsRemove()
|
||||
close(mmapFD);
|
||||
}
|
||||
|
||||
static std::string niceName(const CXXMethodDecl* functionDecl)
|
||||
std::string niceName(const CXXMethodDecl* functionDecl)
|
||||
{
|
||||
std::string s =
|
||||
compat::getReturnType(*functionDecl).getCanonicalType().getAsString()
|
||||
|
Reference in New Issue
Block a user