From 6899c9c176e649b62a30b597ad18da74f5003102 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Mon, 8 Nov 1999 13:54:04 +0000 Subject: [PATCH] Use "using" to bring STL templates from the std:: namespace into normal namespace. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@296 a592a061-630c-0410-9148-cb99ea01b6c8 --- ChangeLog | 6 ++++++ src/BackStack.h | 2 ++ src/DepTable.C | 3 +++ src/DepTable.h | 2 ++ src/LaTeX.C | 2 ++ src/LaTeX.h | 4 ++++ src/lastfiles.C | 5 +++++ src/lastfiles.h | 2 ++ src/layout.C | 2 ++ src/layout.h | 2 ++ src/text2.C | 3 +++ 11 files changed, 33 insertions(+) diff --git a/ChangeLog b/ChangeLog index ce353a4674..d1bf7f7c89 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 1999-11-08 Jean-Marc Lasgouttes + * src/BackStack.h, src/DepTable.C, src/DepTable.h, src/LaTeX.C, + src/LaTeX.h, src/lastfiles.C, src/lastfiles.h, src/layout.C, + src/layout.h, src/text2.C: add 'using' directive to bring the + STL templates we need from the std:: namespace to the global one. + Needed by DEC cxx in strict ansi mode. + * src/support/LIstream.h,src/support/LOstream.h, src/support/lyxstring.h,src/table.h, src/lyxlookup.h: do not include in header diff --git a/src/BackStack.h b/src/BackStack.h index b56bb64147..80e138f669 100644 --- a/src/BackStack.h +++ b/src/BackStack.h @@ -12,6 +12,8 @@ #define BACK_STACK_H #include +using std::stack; + #include "LString.h" // Created by Alejandro Aguilar Sierra, 970806 diff --git a/src/DepTable.C b/src/DepTable.C index dd15f5d042..c9abb08a6c 100644 --- a/src/DepTable.C +++ b/src/DepTable.C @@ -21,6 +21,9 @@ #include "support/lyxlib.h" #include "support/filetools.h" #include +using std::make_pair; +using std::ofstream; +using std::ifstream; void DepTable::insert(string const & fi, bool upd, diff --git a/src/DepTable.h b/src/DepTable.h index 0f9b4827fe..7fe2501058 100644 --- a/src/DepTable.h +++ b/src/DepTable.h @@ -16,6 +16,8 @@ #include "LString.h" #include +using std::map; +using std::pair; #ifdef __GNUG__ #pragma interface diff --git a/src/LaTeX.C b/src/LaTeX.C index f05672c1c3..d4f9e1b4e2 100644 --- a/src/LaTeX.C +++ b/src/LaTeX.C @@ -29,6 +29,8 @@ #include "minibuffer.h" #include "gettext.h" +using std::make_pair; + // TODO: in no particular order // - get rid of the extern BufferList and the call to // BufferList::updateIncludedTeXfiles, this should either diff --git a/src/LaTeX.h b/src/LaTeX.h index e81348eca5..706b248c33 100644 --- a/src/LaTeX.h +++ b/src/LaTeX.h @@ -22,7 +22,11 @@ #include "LString.h" #include "DepTable.h" #include +using std::vector; + #include +using std::ifstream; +using std::ofstream; class MiniBuffer; diff --git a/src/lastfiles.C b/src/lastfiles.C index a30deaba21..6497f8998e 100644 --- a/src/lastfiles.C +++ b/src/lastfiles.C @@ -16,7 +16,12 @@ #endif #include +using std::ifstream; +using std::ofstream; + #include +using std::find; + #include "support/FileInfo.h" #include "lastfiles.h" #include "debug.h" diff --git a/src/lastfiles.h b/src/lastfiles.h index 0fdbf71e86..9faf6b88a5 100644 --- a/src/lastfiles.h +++ b/src/lastfiles.h @@ -17,6 +17,8 @@ #endif #include +using std::deque; + #include "LString.h" diff --git a/src/layout.C b/src/layout.C index 9c0dcf1125..a21afbd0a9 100644 --- a/src/layout.C +++ b/src/layout.C @@ -15,6 +15,8 @@ #endif #include +using std::make_pair; +using std::sort; #include "definitions.h" #include "layout.h" diff --git a/src/layout.h b/src/layout.h index 96231b143c..9096380633 100644 --- a/src/layout.h +++ b/src/layout.h @@ -17,6 +17,8 @@ #endif #include +using std::vector; +using std::pair; #include "definitions.h" #include "lyxlex.h" diff --git a/src/text2.C b/src/text2.C index 57e3af9e9d..dac605c1ea 100644 --- a/src/text2.C +++ b/src/text2.C @@ -13,6 +13,7 @@ #include #include FORMS_H_LOCATION + #ifdef __GNUG__ #pragma implementation "lyxtext.h" #pragma implementation "undo.h" @@ -33,6 +34,8 @@ #include "lyxtext.h" #include "gettext.h" +using std::copy; + extern MiniBuffer * minibuffer; // Constructor