Skip to content

Commit a67a83d

Browse files
committed
removed unused stream-related functions
1 parent 6426839 commit a67a83d

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
@@ -600,18 +600,6 @@ unsigned int CppCheck::checkBuffer(const std::string& filename, const std::strin
600600
});
601601
}
602602

603-
// cppcheck-suppress unusedFunction
604-
unsigned int CppCheck::checkStream(const std::string& filename, const std::string &cfgname, std::istream& fileStream)
605-
{
606-
return checkInternal(filename, cfgname,
607-
[&filename, &fileStream](TokenList& list) {
608-
list.createTokens(fileStream, filename);
609-
},
610-
[&filename, &fileStream](std::vector<std::string>& files, simplecpp::OutputList* outputList) {
611-
return simplecpp::TokenList{fileStream, files, filename, outputList};
612-
});
613-
}
614-
615603
unsigned int CppCheck::checkFile(const std::string& filename, const std::string &cfgname)
616604
{
617605
return checkInternal(filename, cfgname,

lib/cppcheck.h

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

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

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
@@ -113,7 +113,6 @@ class CPPCHECKLIB TokenList {
113113
bool createTokens(const char (&data)[size], const std::string& file0) {
114114
return createTokens(reinterpret_cast<const uint8_t*>(data), size-1, file0);
115115
}
116-
bool createTokens(std::istream &code, Standards::Language lang);
117116
bool createTokens(const uint8_t* data, size_t size, Standards::Language lang);
118117
bool createTokens(const char* data, size_t size, Standards::Language lang) {
119118
return createTokens(reinterpret_cast<const uint8_t*>(data), size, lang);

0 commit comments

Comments
 (0)