Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from davisking:master #81

Merged
merged 14 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion dlib/any/any_function_abstract.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ namespace dlib
#include <iostream>
#include <string>
#include "dlib/any.h"
using namespace std;
void print_message(string str) { cout << str << endl; }
int main()
Expand Down
2 changes: 0 additions & 2 deletions dlib/cmd_line_parser/cmd_line_parser_kernel_1.h
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,6 @@ namespace dlib
const charT** argv
)
{
using namespace std;

// make sure there aren't any arguments hanging around from the last time
// parse was called
this->argv.clear();
Expand Down
1 change: 0 additions & 1 deletion dlib/config_reader/config_reader_thread_safe_1.h
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,6 @@ namespace dlib
fill_block_table (
)
{
using namespace std;
// first empty out the block table
block_table.reset();
while (block_table.move_next())
Expand Down
15 changes: 6 additions & 9 deletions dlib/cpp_pretty_printer/cpp_pretty_printer_kernel_1.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,6 @@ namespace dlib
const std::string& title
) const
{
using namespace std;

if (!out)
throw std::ios::failure("error occurred in cpp_pretty_printer_kernel_1::print");

Expand Down Expand Up @@ -172,7 +170,7 @@ namespace dlib

int type;
stack scopes; // a stack to hold old scopes
string token, temp;
std::string token, temp;
t.get_token(type,token);
while (type != tok::END_OF_FILE)
{
Expand All @@ -188,7 +186,7 @@ namespace dlib
if (type == tok::WHITE_SPACE)
{
t.get_token(type,temp);
if (temp.find_first_of("\n\r") != string::npos)
if (temp.find_first_of("\n\r") != std::string::npos)
recently_seen_preprocessor = false;
}
if (t.peek_type() != tok::IDENTIFIER &&
Expand Down Expand Up @@ -322,7 +320,7 @@ namespace dlib
)
{
temp = token;
istringstream sin(token);
std::istringstream sin(token);
sin >> temp;
sin >> temp;
sin.get();
Expand Down Expand Up @@ -351,7 +349,7 @@ namespace dlib
case tok::WHITE_SPACE: // -----------------------------------------
{
out << token;
if (token.find_first_of("\n\r") != string::npos)
if (token.find_first_of("\n\r") != std::string::npos)
recently_seen_preprocessor = false;
}
break;
Expand Down Expand Up @@ -497,10 +495,9 @@ namespace dlib
const std::string& title
) const
{
using namespace std;
ostringstream sout;
std::ostringstream sout;
print(in,sout,title);
istringstream sin(sout.str());
std::istringstream sin(sout.str());
number(sin,out);
}

Expand Down
13 changes: 5 additions & 8 deletions dlib/cpp_pretty_printer/cpp_pretty_printer_kernel_2.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,6 @@ namespace dlib
const std::string& title
) const
{
using namespace std;

if (!out)
throw std::ios::failure("error occurred in cpp_pretty_printer_kernel_2::print");

Expand Down Expand Up @@ -177,7 +175,7 @@ namespace dlib

int type;
stack scopes; // a stack to hold old scopes
string token, temp;
std::string token, temp;
t.get_token(type,token);
while (type != tok::END_OF_FILE)
{
Expand All @@ -193,7 +191,7 @@ namespace dlib
if (type == tok::WHITE_SPACE)
{
t.get_token(type,temp);
if (temp.find_first_of("\n\r") != string::npos)
if (temp.find_first_of("\n\r") != std::string::npos)
recently_seen_preprocessor = false;
}
if (t.peek_token() != ";" && t.peek_type() != tok::IDENTIFIER &&
Expand Down Expand Up @@ -306,7 +304,7 @@ namespace dlib
case tok::WHITE_SPACE: // -----------------------------------------
{
out << token;
if (token.find_first_of("\n\r") != string::npos)
if (token.find_first_of("\n\r") != std::string::npos)
recently_seen_preprocessor = false;
}
break;
Expand Down Expand Up @@ -434,10 +432,9 @@ namespace dlib
const std::string& title
) const
{
using namespace std;
ostringstream sout;
std::ostringstream sout;
print(in,sout,title);
istringstream sin(sout.str());
std::istringstream sin(sout.str());
number(sin,out);
}

Expand Down
10 changes: 4 additions & 6 deletions dlib/cpp_tokenizer/cpp_tokenizer_kernel_1.h
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,6 @@ namespace dlib
std::string& token
)
{
using namespace std;

if (!have_peeked)
{

Expand Down Expand Up @@ -501,7 +499,7 @@ namespace dlib

case '"':
{
string temp;
std::string temp;
tokenizer.get_token(type,token);
while (type != tok::END_OF_FILE)
{
Expand All @@ -528,7 +526,7 @@ namespace dlib

case '\'':
{
string temp;
std::string temp;
tokenizer.get_token(type,token);
if (type == tok::CHAR && token[0] == '\\')
{
Expand Down Expand Up @@ -557,7 +555,7 @@ namespace dlib
tokenizer.get_token(type,token);
// this is the start of a line comment
token = "//";
string temp;
std::string temp;
tokenizer.get_token(type,temp);
while (type != tok::END_OF_FILE)
{
Expand All @@ -582,7 +580,7 @@ namespace dlib
tokenizer.get_token(type,token);
// this is the start of a block comment
token = "/*";
string temp;
std::string temp;
tokenizer.get_token(type,temp);
while (type != tok::END_OF_FILE)
{
Expand Down
Loading
Loading