Skip to content

Commit 57e0ff3

Browse files
committed
safe_ptr: renamed get() to value()
1 parent 5c4005d commit 57e0ff3

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

cli/cppcheckexecutor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ CppCheckExecutor::CppCheckExecutor()
7474

7575
CppCheckExecutor::~CppCheckExecutor()
7676
{
77-
delete mErrorOutput.get();
77+
delete mErrorOutput.value();
7878
}
7979

8080
bool CppCheckExecutor::parseFromArgs(CppCheck *cppcheck, int argc, const char* const argv[])

lib/checkleakautovar.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ void VarInfo::possibleUsageAll(const std::string &functionName)
141141

142142
void CheckLeakAutoVar::leakError(const Token *tok, const std::string &varname, int type)
143143
{
144-
CheckMemoryLeak checkmemleak(mTokenizer, mErrorLogger.get(), mSettings);
144+
CheckMemoryLeak checkmemleak(mTokenizer, mErrorLogger.value(), mSettings);
145145
if (Library::isresource(type))
146146
checkmemleak.resourceLeakError(tok, varname);
147147
else
@@ -150,14 +150,14 @@ void CheckLeakAutoVar::leakError(const Token *tok, const std::string &varname, i
150150

151151
void CheckLeakAutoVar::mismatchError(const Token *deallocTok, const Token *allocTok, const std::string &varname)
152152
{
153-
CheckMemoryLeak c(mTokenizer, mErrorLogger.get(), mSettings);
153+
CheckMemoryLeak c(mTokenizer, mErrorLogger.value(), mSettings);
154154
const std::list<const Token *> callstack = { allocTok, deallocTok };
155155
c.mismatchAllocDealloc(callstack, varname);
156156
}
157157

158158
void CheckLeakAutoVar::deallocUseError(const Token *tok, const std::string &varname)
159159
{
160-
CheckMemoryLeak c(mTokenizer, mErrorLogger.get(), mSettings);
160+
CheckMemoryLeak c(mTokenizer, mErrorLogger.value(), mSettings);
161161
c.deallocuseError(tok, varname);
162162
}
163163

lib/safeptr.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ class safe_ptr
3434
: mPtr(p)
3535
{}
3636

37-
T* get() NOEXCEPT {
37+
T* value() NOEXCEPT {
3838
return mPtr;
3939
}
4040

41-
const T* get() const NOEXCEPT {
41+
const T* value() const NOEXCEPT {
4242
return mPtr;
4343
}
4444

0 commit comments

Comments
 (0)