Skip to content

Commit 0085e46

Browse files
committed
removed unused stream-related functions
1 parent 06b9780 commit 0085e46

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
@@ -603,18 +603,6 @@ unsigned int CppCheck::checkBuffer(const FileWithDetails &file, const std::strin
603603
});
604604
}
605605

606-
// cppcheck-suppress unusedFunction
607-
unsigned int CppCheck::checkStream(const FileWithDetails &file, const std::string &cfgname, std::istream& fileStream)
608-
{
609-
return checkInternal(file, cfgname,
610-
[&file, &fileStream](TokenList& list) {
611-
list.createTokens(fileStream, file.spath());
612-
},
613-
[&file, &fileStream](std::vector<std::string>& files, simplecpp::OutputList* outputList) {
614-
return simplecpp::TokenList{fileStream, files, file.spath(), outputList};
615-
});
616-
}
617-
618606
unsigned int CppCheck::checkFile(const FileWithDetails& file, const std::string &cfgname)
619607
{
620608
return checkInternal(file, cfgname,

lib/cppcheck.h

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

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

lib/tokenlist.cpp

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

357357
//---------------------------------------------------------------------------
358358

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