Skip to content

Commit 4664ac4

Browse files
committed
removed unused stream-related functions
1 parent 8e6ddf8 commit 4664ac4

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
@@ -177,16 +177,6 @@ class CPPCHECKLIB CppCheck : ErrorLogger {
177177
/** @brief There has been an internal error => Report information message */
178178
void internalError(const std::string &filename, const std::string &msg);
179179

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