From 3b9e9b6df1d124b29bfd3715b6cb12cdee18b2ea Mon Sep 17 00:00:00 2001 From: John Fultz Date: Mon, 17 Jul 2023 15:49:09 -0500 Subject: Fix up std:: namespace hygiene. * Remove all uses of `using namespace std` from header files (although a few specific cases of things like `using std::vector` remain) * Move all existing uses of `using namespace std` in cpp files to after the header includes * Make coordinating changes so it builds again. Qt6 builds on Windows were breaking because of namespace collision between std::byte and some version of `byte` in one of Qt's namespaces. That breakage is now fixed. It would be good to systematically clean up all `using` declarations in header files to ensure nothing is leaking out, but that's for another time. --- lexiconparameters.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lexiconparameters.h') diff --git a/lexiconparameters.h b/lexiconparameters.h index 3d1ac19..96943cc 100644 --- a/lexiconparameters.h +++ b/lexiconparameters.h @@ -23,6 +23,8 @@ #include "gaddag.h" +using std::vector; + namespace Quackle { @@ -31,8 +33,8 @@ class LexiconParameters; class LexiconInterpreter { public: - virtual void loadDawg(ifstream &file, LexiconParameters &lexparams) = 0; - virtual void loadGaddag(ifstream &file, LexiconParameters &lexparams) = 0; + virtual void loadDawg(std::ifstream &file, LexiconParameters &lexparams) = 0; + virtual void loadGaddag(std::ifstream &file, LexiconParameters &lexparams) = 0; virtual void dawgAt(const unsigned char *dawg, int index, unsigned int &p, Letter &letter, bool &t, bool &lastchild, bool &british, int &playability) const = 0; virtual int versionNumber() const = 0; virtual ~LexiconInterpreter() {}; -- cgit v1.2.3