Skip to content

Commit da820c6

Browse files
committed
removed unused stream-related functions
1 parent 975124f commit da820c6

File tree

4 files changed

+0
-37
lines changed

4 files changed

+0
-37
lines changed

lib/cppcheck.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -618,18 +618,6 @@ unsigned int CppCheck::checkBuffer(const FileWithDetails &file, const std::strin
618618
});
619619
}
620620

621-
// cppcheck-suppress unusedFunction
622-
unsigned int CppCheck::checkStream(const FileWithDetails &file, const std::string &cfgname, std::istream& fileStream)
623-
{
624-
return checkInternal(file, cfgname,
625-
[&file, &fileStream](TokenList& list) {
626-
list.createTokens(fileStream, file.spath());
627-
},
628-
[&file, &fileStream](std::vector<std::string>& files, simplecpp::OutputList* outputList) {
629-
return simplecpp::TokenList{fileStream, files, file.spath(), outputList};
630-
});
631-
}
632-
633621
unsigned int CppCheck::checkFile(const FileWithDetails& file, const std::string &cfgname)
634622
{
635623
return checkInternal(file, cfgname,

lib/cppcheck.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -176,16 +176,6 @@ class CPPCHECKLIB CppCheck : ErrorLogger {
176176
/** @brief There has been an internal error => Report information message */
177177
void internalError(const std::string &filename, const std::string &msg);
178178

179-
/**
180-
* @brief Check a file using stream
181-
* @param file the file
182-
* @param cfgname cfg name
183-
* @param fileStream stream the file content can be read from
184-
* @return number of errors found
185-
*/
186-
unsigned int checkStream(const FileWithDetails& file, const std::string &cfgname, std::istream& fileStream);
187-
188-
189179
/**
190180
* @brief Check a file
191181
* @param file the file

lib/tokenlist.cpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -357,20 +357,6 @@ bool TokenList::createTokens(const uint8_t* data, size_t size, const std::string
357357

358358
//---------------------------------------------------------------------------
359359

360-
bool TokenList::createTokens(std::istream &code, Standards::Language lang)
361-
{
362-
ASSERT_LANG(lang != Standards::Language::None);
363-
if (mLang == Standards::Language::None) {
364-
mLang = lang;
365-
} else {
366-
ASSERT_LANG(lang == mLang);
367-
}
368-
369-
return createTokensInternal(code, "");
370-
}
371-
372-
//---------------------------------------------------------------------------
373-
374360
bool TokenList::createTokens(const uint8_t* data, size_t size, Standards::Language lang)
375361
{
376362
ASSERT_LANG(lang != Standards::Language::None);

lib/tokenlist.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ class CPPCHECKLIB TokenList {
114114
bool createTokens(const char (&data)[size], const std::string& file0) {
115115
return createTokens(reinterpret_cast<const uint8_t*>(data), size-1, file0);
116116
}
117-
bool createTokens(std::istream &code, Standards::Language lang);
118117
bool createTokens(const uint8_t* data, size_t size, Standards::Language lang);
119118
bool createTokens(const char* data, size_t size, Standards::Language lang) {
120119
return createTokens(reinterpret_cast<const uint8_t*>(data), size, lang);

0 commit comments

Comments
 (0)