From: Christian Ridderström Date: Sun, 23 Jul 2017 11:11:54 +0000 (+0200) Subject: Bulk cleanup/fix incorrect annotation at the end of namespaces. X-Git-Tag: 2.3.0beta1~149 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=e30f3d76d2bee0011ceaeb5f0cc221156458cbad;p=lyx.git Bulk cleanup/fix incorrect annotation at the end of namespaces. This commit does a bulk fix of incorrect annotations (comments) at the end of namespaces. The commit was generated by initially running clang-format, and then from the diff of the result extracting the hunks corresponding to fixes of namespace comments. The changes being applied and all the results have been manually reviewed. The source code successfully builds on macOS. Further details on the steps below, in case they're of interest to someone else in the future. 1. Checkout a fresh and up to date version of src/ git pull && git checkout -- src && git status src 2. Ensure there's a suitable .clang-format in place, i.e. with options to fix the comment at the end of namespaces, including: FixNamespaceComments: true SpacesBeforeTrailingComments: 1 and that clang-format is >= 5.0.0, by doing e.g.: clang-format -dump-config | grep Comments: clang-format --version 3. Apply clang-format to the source: clang-format -i $(find src -name "*.cpp" -or -name "*.h") 4. Create and filter out hunks related to fixing the namespace git diff -U0 src > tmp.patch grepdiff '^} // namespace' --output-matching=hunk tmp.patch > fix_namespace.patch 5. Filter out hunks corresponding to simple fixes into to a separate patch: pcregrep -M -e '^diff[^\n]+\nindex[^\n]+\n--- [^\n]+\n\+\+\+ [^\n]+\n' \ -e '^@@ -[0-9]+ \+[0-9]+ @@[^\n]*\n-\}[^\n]*\n\+\}[^\n]*\n' \ fix_namespace.patch > fix_namespace_simple.patch 6. Manually review the simple patch and then apply it, after first restoring the source. git checkout -- src patch -p1 < fix_namespace_simple.path 7. Manually review the (simple) changes and then stage the changes git diff src git add src 8. Again apply clang-format and filter out hunks related to any remaining fixes to the namespace, this time filter with more context. There will be fewer hunks as all the simple cases have already been handled: clang-format -i $(find src -name "*.cpp" -or -name "*.h") git diff src > tmp.patch grepdiff '^} // namespace' --output-matching=hunk tmp.patch > fix_namespace2.patch 9. Manually review/edit the resulting patch file to remove hunks for files which need to be dealt with manually, noting the file names and line numbers. Then restore files to as before applying clang-format and apply the patch: git checkout src patch -p1 < fix_namespace2.patch 10. Manually fix the files noted in the previous step. Stage files, review changes and commit. --- diff --git a/src/AspellChecker.cpp b/src/AspellChecker.cpp index 61eab520e5..96a8f8e73c 100644 --- a/src/AspellChecker.cpp +++ b/src/AspellChecker.cpp @@ -49,7 +49,7 @@ struct Speller { typedef std::map Spellers; typedef map LangPersonalWordList; -} // anon namespace +} // namespace struct AspellChecker::Private { diff --git a/src/BiblioInfo.cpp b/src/BiblioInfo.cpp index 07c0b67f9a..87245d3824 100644 --- a/src/BiblioInfo.cpp +++ b/src/BiblioInfo.cpp @@ -476,7 +476,7 @@ docstring processRichtext(docstring const & str, bool richtext) return ret; } -} // anon namespace +} // namespace ////////////////////////////////////////////////////////////////////// @@ -756,7 +756,7 @@ docstring parseOptions(docstring const & format, string & optkey, } -} // anon namespace +} // namespace /* FIXME Bug #9131 revealed an oddity in how we are generating citation information @@ -1148,7 +1148,7 @@ public: } }; -} // namespace anon +} // namespace vector const BiblioInfo::getXRefs(BibTeXInfo const & data, bool const nested) const @@ -1409,7 +1409,7 @@ bool lSorter(BibTeXInfo const * lhs, BibTeXInfo const * rhs) || (lauth == rauth && lyear == ryear && ltitl < rtitl); } -} +} // namespace void BiblioInfo::collectCitedEntries(Buffer const & buf) diff --git a/src/BranchList.cpp b/src/BranchList.cpp index 4624f19f4d..ec6a413c6c 100644 --- a/src/BranchList.cpp +++ b/src/BranchList.cpp @@ -42,7 +42,7 @@ private: docstring name_; }; -} +} // namespace Branch::Branch() diff --git a/src/Buffer.cpp b/src/Buffer.cpp index df7efa8f0c..a9cc619060 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -136,7 +136,7 @@ int const LYX_FORMAT = LYX_FORMAT_LYX; typedef map DepClean; typedef map > RefCache; -} // namespace anon +} // namespace // A storehouse for the cloned buffers. @@ -4100,7 +4100,7 @@ int AutoSaveBuffer::generateChild() return pid; } -} // namespace anon +} // namespace FileName Buffer::getEmergencyFileName() const diff --git a/src/Buffer.h b/src/Buffer.h index d483de9a08..165f5d8795 100644 --- a/src/Buffer.h +++ b/src/Buffer.h @@ -64,18 +64,18 @@ class WordLangTuple; namespace frontend { class GuiBufferDelegate; class WorkAreaManager; -} +} // namespace frontend namespace support { class DocFileName; class FileName; class FileNamePairList; -} +} // namespace support namespace graphics { class PreviewLoader; class Cache; -} +} // namespace graphics class Buffer; diff --git a/src/BufferList.h b/src/BufferList.h index d4ae186a90..01698af4bb 100644 --- a/src/BufferList.h +++ b/src/BufferList.h @@ -26,7 +26,7 @@ class OutputParams; namespace support { class FileName; class FileNameList; -} +} // namespace support /** * The class holds all all open buffers, and handles construction diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp index f4890eaeec..22e84778fe 100644 --- a/src/BufferParams.cpp +++ b/src/BufferParams.cpp @@ -323,7 +323,7 @@ bool inSystemDir(FileName const & document_dir, string & system_dir) return false; } -} // anon namespace +} // namespace class BufferParams::Impl @@ -1119,7 +1119,7 @@ namespace { return "\"" + str + "\""; return str; } -} +} // namespace void BufferParams::writeFile(ostream & os, Buffer const * buf) const diff --git a/src/BufferView.cpp b/src/BufferView.cpp index 2f256369f6..19547ef564 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -216,7 +216,7 @@ enum ScreenUpdateStrategy { DecorationUpdate }; -} // anon namespace +} // namespace ///////////////////////////////////////////////////////////////////// diff --git a/src/Changes.cpp b/src/Changes.cpp index 343af39b1e..8d4933c55f 100644 --- a/src/Changes.cpp +++ b/src/Changes.cpp @@ -382,7 +382,7 @@ docstring getLaTeXMarkup(docstring const & macro, docstring const & author, return ods.str(); } -} //namespace anon +} // namespace int Changes::latexMarkChange(otexstream & os, BufferParams const & bparams, diff --git a/src/CiteEnginesList.cpp b/src/CiteEnginesList.cpp index 3c10b4003c..58b686511b 100644 --- a/src/CiteEnginesList.cpp +++ b/src/CiteEnginesList.cpp @@ -148,7 +148,7 @@ CiteEngineTypeTranslator const & citeenginetypetranslator() return translator; } -} // namespace anon +} // namespace string CiteEnginesList::getTypeAsString(CiteEngineType const & et) const diff --git a/src/CiteEnginesList.h b/src/CiteEnginesList.h index a9ed959648..24bec03852 100644 --- a/src/CiteEnginesList.h +++ b/src/CiteEnginesList.h @@ -156,5 +156,5 @@ public: }; extern CiteEnginesList theCiteEnginesList; -} +} // namespace lyx #endif diff --git a/src/Converter.cpp b/src/Converter.cpp index d7bdf0a7d5..489f5df439 100644 --- a/src/Converter.cpp +++ b/src/Converter.cpp @@ -95,7 +95,7 @@ private: string const to_; }; -} // namespace anon +} // namespace Converter::Converter(string const & f, string const & t, diff --git a/src/ConverterCache.cpp b/src/ConverterCache.cpp index 60ce245ab9..2373b84d2f 100644 --- a/src/ConverterCache.cpp +++ b/src/ConverterCache.cpp @@ -76,7 +76,7 @@ public: unsigned long checksum; }; -} +} // namespace /** The cache contains one item per orig file and target format, so use a diff --git a/src/Counters.cpp b/src/Counters.cpp index 75c891128e..2daac53224 100644 --- a/src/Counters.cpp +++ b/src/Counters.cpp @@ -482,7 +482,7 @@ docstring const fnsymbolCounter(int const n) }; } -} // namespace anon +} // namespace docstring Counters::labelItem(docstring const & ctr, diff --git a/src/Cursor.cpp b/src/Cursor.cpp index 1223782c35..0c8ee1d6c5 100644 --- a/src/Cursor.cpp +++ b/src/Cursor.cpp @@ -115,7 +115,7 @@ DocIterator bruteFind(Cursor const & c, int x, int y) } -} // namespace anon +} // namespace CursorData::CursorData() @@ -758,7 +758,7 @@ bool findNonVirtual(Row const & row, Row::const_iterator & cit, bool onleft) return cit != row.end() && !cit->isVirtual(); } -} +} // namespace void Cursor::getSurroundingPos(pos_type & left_pos, pos_type & right_pos) const { @@ -2054,7 +2054,7 @@ docstring parbreak(Cursor const * cur) return os.str(); } -} +} // namespace docstring Cursor::selectionAsString(bool with_label) const diff --git a/src/CutAndPaste.cpp b/src/CutAndPaste.cpp index 1a63c40fc6..05f9b90bca 100644 --- a/src/CutAndPaste.cpp +++ b/src/CutAndPaste.cpp @@ -659,9 +659,7 @@ void copySelectionHelper(Buffer const & buf, Text const & text, cutstack.push(make_pair(copy_pars, dc)); } -} // namespace anon - - +} // namespace namespace cap { @@ -933,7 +931,7 @@ void cutSelectionHelper(Cursor & cur, CutStack & cuts, bool doclear, bool realcu } } -} +} // namespace void cutSelection(Cursor & cur, bool doclear, bool realcut) { @@ -1010,7 +1008,7 @@ void copySelectionToStack(Cursor const & cur, CutStack & cutstack) } } -} +} // namespace void copySelectionToStack() diff --git a/src/CutAndPaste.h b/src/CutAndPaste.h index 94535151c7..43a89c33d0 100644 --- a/src/CutAndPaste.h +++ b/src/CutAndPaste.h @@ -164,6 +164,6 @@ void dirtyTabularStack(bool b); /// is the tabular paste stack newer than the ordinary one? bool tabularStackDirty(); } // namespace cap -} // namespce lyx +} // namespace lyx #endif diff --git a/src/DocumentClassPtr.h b/src/DocumentClassPtr.h index b2c95a0023..42479b3137 100644 --- a/src/DocumentClassPtr.h +++ b/src/DocumentClassPtr.h @@ -19,6 +19,6 @@ class DocumentClass; typedef std::shared_ptr DocumentClassPtr; typedef std::shared_ptr DocumentClassConstPtr; -} +} // namespace lyx #endif // DISPATCH_RESULT_H diff --git a/src/EnchantChecker.cpp b/src/EnchantChecker.cpp index d2b849175d..5ef399a24a 100644 --- a/src/EnchantChecker.cpp +++ b/src/EnchantChecker.cpp @@ -36,7 +36,7 @@ struct Speller { typedef map Spellers; -} // anon namespace +} // namespace struct EnchantChecker::Private { diff --git a/src/Encoding.cpp b/src/Encoding.cpp index 7dc12af027..96e35ecbb7 100644 --- a/src/Encoding.cpp +++ b/src/Encoding.cpp @@ -59,7 +59,7 @@ MathAlphaSet mathalpha; /// The highest code point in UCS4 encoding (1<<20 + 1<<16) char_type const max_ucs4 = 0x110000; -} // namespace anon +} // namespace EncodingException::EncodingException(char_type c) diff --git a/src/Font.cpp b/src/Font.cpp index 89dc802af0..450d67fa3a 100644 --- a/src/Font.cpp +++ b/src/Font.cpp @@ -94,7 +94,7 @@ char const * LaTeXSizeNames[NUM_SIZE + 4] = { "tiny", "scriptsize", "footnotesize", "small", "normalsize", "large", "Large", "LARGE", "huge", "Huge", "error8", "error9", "error10", "error11" }; -} // namespace anon +} // namespace Font::Font(FontInfo bits, Language const * l) diff --git a/src/FontInfo.cpp b/src/FontInfo.cpp index b6e7d6726e..2aaab38e5d 100644 --- a/src/FontInfo.cpp +++ b/src/FontInfo.cpp @@ -524,7 +524,7 @@ string getSizeCSS(FontSize const & s) return ""; } -} // namespace anonymous +} // namespace // FIXME This does not yet handle color diff --git a/src/Format.cpp b/src/Format.cpp index 4a33eb07c4..b7a8c20b94 100644 --- a/src/Format.cpp +++ b/src/Format.cpp @@ -102,7 +102,7 @@ private: }; -} //namespace anon +} // namespace bool Format::formatSorter(Format const * lhs, Format const * rhs) { @@ -397,7 +397,7 @@ string guessFormatFromContents(FileName const & fn) return string(); } -} +} // namespace string Formats::getFormatFromFile(FileName const & filename) const @@ -857,7 +857,7 @@ FlavorTranslator const & flavorTranslator() return translator; } -} +} // namespace std::string flavor2format(OutputParams::FLAVOR flavor) diff --git a/src/FuncRequest.cpp b/src/FuncRequest.cpp index 224ba27894..cd47c55595 100644 --- a/src/FuncRequest.cpp +++ b/src/FuncRequest.cpp @@ -101,7 +101,7 @@ void splitArg(vector & args, string const & str, } } -} +} // namespace string FuncRequest::getArg(unsigned int i) const { diff --git a/src/HunspellChecker.cpp b/src/HunspellChecker.cpp index 4aac75d4ee..6dc6647b5c 100644 --- a/src/HunspellChecker.cpp +++ b/src/HunspellChecker.cpp @@ -47,7 +47,7 @@ typedef map LangPersonalWordList; typedef vector IgnoreList; -} // anon namespace +} // namespace struct HunspellChecker::Private diff --git a/src/IndicesList.cpp b/src/IndicesList.cpp index 26881549a1..e974cebc9d 100644 --- a/src/IndicesList.cpp +++ b/src/IndicesList.cpp @@ -58,7 +58,7 @@ private: docstring shortc_; }; -} +} // namespace ///////////////////////////////////////////////////////////////////// diff --git a/src/InsetList.cpp b/src/InsetList.cpp index d1b6d43d80..50cf8e9d2c 100644 --- a/src/InsetList.cpp +++ b/src/InsetList.cpp @@ -36,7 +36,7 @@ struct InsetTablePosLess } }; -} // namespace anon +} // namespace InsetList::InsetList(InsetList const & il) : list_(il.list_) diff --git a/src/LaTeX.cpp b/src/LaTeX.cpp index ab11854e29..a768c99164 100644 --- a/src/LaTeX.cpp +++ b/src/LaTeX.cpp @@ -58,7 +58,7 @@ docstring runMessage(unsigned int count) return bformat(_("Waiting for LaTeX run number %1$d"), count); } -} // anon namespace +} // namespace /* * CLASS TEXERRORS @@ -1132,7 +1132,7 @@ int iterateLine(string const & token, regex const & reg, string const & closing, return result; } -} // anon namespace +} // namespace void LaTeX::deplog(DepTable & head) diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp index 54cf237eb5..92e48293cd 100644 --- a/src/LaTeXFeatures.cpp +++ b/src/LaTeXFeatures.cpp @@ -682,7 +682,7 @@ TexString getSnippets(std::list const & list) return snip.release(); } -} //anon namespace +} // namespace void LaTeXFeatures::addPreambleSnippet(TexString ts, bool allow_dupes) @@ -997,7 +997,7 @@ int const nb_bibliofeatures = sizeof(bibliofeatures) / sizeof(char const *); int const nb_simplefeatures = sizeof(simplefeatures) / sizeof(char const *); -} +} // namespace string const LaTeXFeatures::getColorOptions() const @@ -1770,7 +1770,7 @@ docstring const i18npreamble(docstring const & templ, Language const * lang, return from_utf8(preamble); } -} +} // namespace docstring const LaTeXFeatures::getTClassI18nPreamble(bool use_babel, diff --git a/src/Language.cpp b/src/Language.cpp index 902eab3ad4..31212cba28 100644 --- a/src/Language.cpp +++ b/src/Language.cpp @@ -329,7 +329,7 @@ Match match(string const & code, Language const & lang) return NoMatch; } -} +} // namespace void Languages::readLayoutTranslations(support::FileName const & filename) diff --git a/src/Layout.cpp b/src/Layout.cpp index ea651daf22..f9d181db73 100644 --- a/src/Layout.cpp +++ b/src/Layout.cpp @@ -1578,7 +1578,7 @@ string makeMarginValue(char const * side, double d) return os.str(); } -} +} // namespace void Layout::makeDefaultCSS() const diff --git a/src/LayoutModuleList.h b/src/LayoutModuleList.h index 8b47074a8e..c56e572572 100644 --- a/src/LayoutModuleList.h +++ b/src/LayoutModuleList.h @@ -96,5 +96,5 @@ private: /// std::list lml_; }; -} +} // namespace lyx #endif diff --git a/src/Lexer.cpp b/src/Lexer.cpp index 9cb5452ea9..becd157886 100644 --- a/src/Lexer.cpp +++ b/src/Lexer.cpp @@ -148,7 +148,7 @@ public: } }; -} // end of anon namespace +} // namespace Lexer::Pimpl::Pimpl(LexerKeyword * tab, int num) diff --git a/src/LyX.cpp b/src/LyX.cpp index 0a0a31959b..4e97f7ae64 100644 --- a/src/LyX.cpp +++ b/src/LyX.cpp @@ -150,7 +150,7 @@ void showFileError(string const & error) "Please check your installation."), from_utf8(error))); } -} // namespace anon +} // namespace /// The main application class private implementation. struct LyX::Impl { @@ -775,7 +775,7 @@ namespace { return std::string(line, nameLen); } } -} +} // namespace void cleanDuplicateEnvVars() { @@ -1384,7 +1384,7 @@ int parse_force(string const & arg, string const &, string &) } -} // namespace anon +} // namespace void LyX::easyParse(int & argc, char * argv[]) diff --git a/src/LyXRC.cpp b/src/LyXRC.cpp index 802e3cd47b..27d5fcf3a0 100644 --- a/src/LyXRC.cpp +++ b/src/LyXRC.cpp @@ -212,7 +212,7 @@ LexerKeyword lyxrcTags[] = { const int lyxrcCount = sizeof(lyxrcTags) / sizeof(lyxrcTags[0]); -} // namespace anon +} // namespace LyXRC::LyXRC() @@ -377,7 +377,7 @@ void oldFontFormat(string & family, string & foundry) foundry.erase(); } -} // namespace anon +} // namespace bool LyXRC::read(FileName const & filename, bool check_format) @@ -1287,7 +1287,7 @@ namespace { "\"", "\\\""); } -} +} // namespace void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) const diff --git a/src/ModuleList.h b/src/ModuleList.h index 9f6434ef81..e2d4a28f02 100644 --- a/src/ModuleList.h +++ b/src/ModuleList.h @@ -155,5 +155,5 @@ public: }; extern ModuleList theModuleList; -} +} // namespace lyx #endif diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index 73157e6b7d..7c3300d601 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -87,7 +87,7 @@ namespace { /// Inset identifier (above 0x10ffff, for ucs-4) char_type const META_INSET = 0x200001; -} +} // namespace ///////////////////////////////////////////////////////////////////// @@ -1569,7 +1569,7 @@ void flushString(ostream & os, docstring & s) s.erase(); } -} +} // namespace void Paragraph::write(ostream & os, BufferParams const & bparams, @@ -2200,7 +2200,7 @@ bool corrected_env(otexstream & os, string const & suffix, string const & env, return true; } -} // namespace anon +} // namespace int Paragraph::Private::startTeXParParams(BufferParams const & bparams, @@ -2928,7 +2928,7 @@ void doFontSwitch(vector & tagsToOpen, flag = false; } } -} +} // namespace docstring Paragraph::simpleLyXHTMLOnePar(Buffer const & buf, diff --git a/src/Server.cpp b/src/Server.cpp index 4364f08e41..f545bb5038 100644 --- a/src/Server.cpp +++ b/src/Server.cpp @@ -117,7 +117,7 @@ string errormsg(DWORD const error) return message; } -} // namespace anon +} // namespace DWORD WINAPI pipeServerWrapper(void * arg) @@ -997,7 +997,7 @@ struct Sleep : QThread } }; -} // namespace anon +} // namespace bool LyXComm::loadFilesInOtherInstance() diff --git a/src/Session.cpp b/src/Session.cpp index 3dc2ebc9ee..f2cb8b4ca0 100644 --- a/src/Session.cpp +++ b/src/Session.cpp @@ -36,7 +36,7 @@ string const sec_toolbars = "[toolbars]"; string const sec_lastcommands = "[last commands]"; string const sec_authfiles = "[auth files]"; -} // anon namespace +} // namespace namespace lyx { @@ -480,4 +480,4 @@ void AuthFilesSection::write(ostream & os) const } -} +} // namespace lyx diff --git a/src/Session.h b/src/Session.h index f471f4d28e..8074b56dd9 100644 --- a/src/Session.h +++ b/src/Session.h @@ -408,6 +408,6 @@ private: /// Implemented in LyX.cpp. Session & theSession(); -} // lyx +} // namespace lyx #endif diff --git a/src/Spacing.cpp b/src/Spacing.cpp index 0239a090db..cd5816e600 100644 --- a/src/Spacing.cpp +++ b/src/Spacing.cpp @@ -99,7 +99,7 @@ string envName(Spacing::Space space, bool useSetSpace) return useSetSpace ? name : support::ascii_lowercase(name); } -} +} // namespace string const Spacing::writeEnvirBegin(bool useSetSpace) const { diff --git a/src/Text.cpp b/src/Text.cpp index 1224406682..8cac506e56 100644 --- a/src/Text.cpp +++ b/src/Text.cpp @@ -948,7 +948,7 @@ bool canInsertChar(Cursor const & cur, char_type c) return true; } -} +} // namespace // insert a character, moves all the following breaks in the diff --git a/src/Text3.cpp b/src/Text3.cpp index 364e91c1dc..68e3f2f66b 100644 --- a/src/Text3.cpp +++ b/src/Text3.cpp @@ -491,7 +491,7 @@ namespace { return lang.empty() ? cur.getFont().language() : languages.getLanguage(lang); } -} +} // namespace void Text::dispatch(Cursor & cur, FuncRequest & cmd) diff --git a/src/TextClass.cpp b/src/TextClass.cpp index 0a903cb8e0..eb79e13eae 100644 --- a/src/TextClass.cpp +++ b/src/TextClass.cpp @@ -133,7 +133,7 @@ string translateReadType(TextClass::ReadType rt) return string(); } -} // namespace anon +} // namespace // This string should not be translated here, @@ -282,7 +282,7 @@ LexerKeyword textClassTags[] = { { "tocdepth", TC_TOCDEPTH } }; -} //namespace anon +} // namespace bool TextClass::convertLayoutFormat(support::FileName const & filename, ReadType rt) diff --git a/src/TextMetrics.cpp b/src/TextMetrics.cpp index 0d60e0bcdd..f94accae67 100644 --- a/src/TextMetrics.cpp +++ b/src/TextMetrics.cpp @@ -97,7 +97,7 @@ int numberOfHfills(Row const & row, ParagraphMetrics const & pm, } -} +} // namespace ///////////////////////////////////////////////////////////////////// // @@ -806,7 +806,7 @@ private: pos_type bodypos_; }; -} // anon namespace +} // namespace /** This is the function where the hard work is done. The code here is * very sensitive to small changes :) Note that part of the diff --git a/src/Thesaurus.cpp b/src/Thesaurus.cpp index 7830c6e1ef..e2c28183ee 100644 --- a/src/Thesaurus.cpp +++ b/src/Thesaurus.cpp @@ -46,7 +46,7 @@ namespace { typedef std::map Thesauri; -} // namespace anon +} // namespace struct Thesaurus::Private { diff --git a/src/frontends/qt4/CategorizedCombo.cpp b/src/frontends/qt4/CategorizedCombo.cpp index b1849fb920..757196377a 100644 --- a/src/frontends/qt4/CategorizedCombo.cpp +++ b/src/frontends/qt4/CategorizedCombo.cpp @@ -584,8 +584,8 @@ QString const & CategorizedCombo::filter() const return d->filter_; } -} // namespace frontend -} // namespace lyx +} // namespace frontend +} // namespace lyx #include "moc_CategorizedCombo.cpp" diff --git a/src/frontends/qt4/ColorCache.cpp b/src/frontends/qt4/ColorCache.cpp index f5dd963ffe..6036099e47 100644 --- a/src/frontends/qt4/ColorCache.cpp +++ b/src/frontends/qt4/ColorCache.cpp @@ -54,7 +54,7 @@ QPalette::ColorRole role(ColorCode col) } } -} +} // namespace void ColorCache::init() diff --git a/src/frontends/qt4/DockView.cpp b/src/frontends/qt4/DockView.cpp index c1b459bb04..de9a51c78f 100644 --- a/src/frontends/qt4/DockView.cpp +++ b/src/frontends/qt4/DockView.cpp @@ -48,7 +48,7 @@ void DockView::keyPressEvent(QKeyEvent * ev) } -} // frontend -} // lyx +} // namespace frontend +} // namespace lyx #include "moc_DockView.cpp" diff --git a/src/frontends/qt4/DockView.h b/src/frontends/qt4/DockView.h index 621368bdfc..3c54c2ad20 100644 --- a/src/frontends/qt4/DockView.h +++ b/src/frontends/qt4/DockView.h @@ -61,7 +61,7 @@ protected Q_SLOTS: void onBufferViewChanged() {} //override }; -} // frontend -} // lyx +} // namespace frontend +} // namespace lyx #endif // DOCK_VIEW_H diff --git a/src/frontends/qt4/FancyLineEdit.cpp b/src/frontends/qt4/FancyLineEdit.cpp index 0e35ebb6ce..ca7ca48162 100644 --- a/src/frontends/qt4/FancyLineEdit.cpp +++ b/src/frontends/qt4/FancyLineEdit.cpp @@ -314,9 +314,9 @@ void IconButton::animateShow(bool visible) } } -} +} // namespace frontend -} +} // namespace lyx #endif // QT_VERSION >= 0x040600 diff --git a/src/frontends/qt4/FancyLineEdit.h b/src/frontends/qt4/FancyLineEdit.h index ef6b45aa5f..5a2a542861 100644 --- a/src/frontends/qt4/FancyLineEdit.h +++ b/src/frontends/qt4/FancyLineEdit.h @@ -107,7 +107,7 @@ private: QString m_oldText; }; -} -} +} // namespace frontend +} // namespace lyx #endif // FANCYLINEEDIT_H diff --git a/src/frontends/qt4/GuiApplication.cpp b/src/frontends/qt4/GuiApplication.cpp index eb80393c52..c9320ec403 100644 --- a/src/frontends/qt4/GuiApplication.cpp +++ b/src/frontends/qt4/GuiApplication.cpp @@ -474,7 +474,7 @@ QString findImg(QString const & name) return img_name; } -} // namespace anon +} // namespace QString themeIconName(QString const & action) @@ -2657,7 +2657,7 @@ namespace { const QFontInfo fi(font); return fi.fixedPitch(); } -} +} // namespace QFont const GuiApplication::typewriterSystemFont() diff --git a/src/frontends/qt4/GuiCharacter.cpp b/src/frontends/qt4/GuiCharacter.cpp index aa9f037d5d..ff7cc5d10e 100644 --- a/src/frontends/qt4/GuiCharacter.cpp +++ b/src/frontends/qt4/GuiCharacter.cpp @@ -193,7 +193,7 @@ void fillComboColor(QComboBox * combo, QList const & list) combo->addItem(qt_("Reset"), "inherit"); } -} // namespace anon +} // namespace GuiCharacter::GuiCharacter(GuiView & lv) : GuiDialog(lv, "character", qt_("Text Style")), font_(ignore_font, ignore_language), diff --git a/src/frontends/qt4/GuiClipboard.cpp b/src/frontends/qt4/GuiClipboard.cpp index 4c8d47e7f8..1fa6aba835 100644 --- a/src/frontends/qt4/GuiClipboard.cpp +++ b/src/frontends/qt4/GuiClipboard.cpp @@ -358,7 +358,7 @@ QString tidyHtml(QString input) converter.setHtml(input); return converter.toHtml("utf-8"); } -} +} // namespace docstring const GuiClipboard::getAsText(TextType type) const diff --git a/src/frontends/qt4/GuiCommandBuffer.cpp b/src/frontends/qt4/GuiCommandBuffer.cpp index f14ba879ad..c13bdfe578 100644 --- a/src/frontends/qt4/GuiCommandBuffer.cpp +++ b/src/frontends/qt4/GuiCommandBuffer.cpp @@ -79,7 +79,7 @@ protected: } }; -} // end of anon +} // namespace GuiCommandBuffer::GuiCommandBuffer(GuiView * view) @@ -272,7 +272,7 @@ public: bool operator()(string const & s) const { return prefixIs(s, p); } }; -} // end of anon namespace +} // namespace string const GuiCommandBuffer::historyUp() diff --git a/src/frontends/qt4/GuiDelimiter.cpp b/src/frontends/qt4/GuiDelimiter.cpp index 0d7ad5d219..683168c38a 100644 --- a/src/frontends/qt4/GuiDelimiter.cpp +++ b/src/frontends/qt4/GuiDelimiter.cpp @@ -177,7 +177,7 @@ string getDelimiterName(QListWidgetItem const * lwi) } -} // anon namespace +} // namespace GuiDelimiter::GuiDelimiter(GuiView & lv) diff --git a/src/frontends/qt4/GuiDocument.cpp b/src/frontends/qt4/GuiDocument.cpp index 89cd1c944a..e8d66ec3a3 100644 --- a/src/frontends/qt4/GuiDocument.cpp +++ b/src/frontends/qt4/GuiDocument.cpp @@ -183,7 +183,7 @@ public: } }; -} +} // namespace namespace frontend { namespace { diff --git a/src/frontends/qt4/GuiErrorList.cpp b/src/frontends/qt4/GuiErrorList.cpp index f25f1940c4..4f97d27b10 100644 --- a/src/frontends/qt4/GuiErrorList.cpp +++ b/src/frontends/qt4/GuiErrorList.cpp @@ -52,7 +52,7 @@ string const guiErrorType(string const & s) return s; } -} // namespace anon +} // namespace namespace lyx { namespace frontend { diff --git a/src/frontends/qt4/GuiExternal.cpp b/src/frontends/qt4/GuiExternal.cpp index f940a73010..07eb8fce2d 100644 --- a/src/frontends/qt4/GuiExternal.cpp +++ b/src/frontends/qt4/GuiExternal.cpp @@ -80,7 +80,7 @@ char const * const origin_gui_strs[] = { N_("Top right"), N_("Bottom right"), N_("Baseline right") }; -} // namespace anon +} // namespace GuiExternal::GuiExternal(GuiView & lv) diff --git a/src/frontends/qt4/GuiFontLoader.cpp b/src/frontends/qt4/GuiFontLoader.cpp index f92222d520..4f705330f9 100644 --- a/src/frontends/qt4/GuiFontLoader.cpp +++ b/src/frontends/qt4/GuiFontLoader.cpp @@ -234,7 +234,7 @@ QFont symbolFont(QString const & family, bool * ok) return font; } -} // namespace anon +} // namespace FontLoader::FontLoader() @@ -370,7 +370,7 @@ QFont makeQFont(FontInfo const & f) return font; } -} // anon namespace +} // namespace GuiFontInfo::GuiFontInfo(FontInfo const & f) diff --git a/src/frontends/qt4/GuiFontMetrics.cpp b/src/frontends/qt4/GuiFontMetrics.cpp index d1ee09a184..1c00372b38 100644 --- a/src/frontends/qt4/GuiFontMetrics.cpp +++ b/src/frontends/qt4/GuiFontMetrics.cpp @@ -41,7 +41,7 @@ uint qHash(lyx::docstring const & s) s.size() * sizeof(lyx::docstring::value_type))); } -} +} // namespace std namespace lyx { namespace frontend { @@ -84,7 +84,7 @@ inline QChar const ucs4_to_qchar(char_type const ucs4) LATTEST(is_utf16(ucs4)); return QChar(static_cast(ucs4)); } -} // anon namespace +} // namespace GuiFontMetrics::GuiFontMetrics(QFont const & font) diff --git a/src/frontends/qt4/GuiGraphics.cpp b/src/frontends/qt4/GuiGraphics.cpp index 5910ec8813..c32ec2c610 100644 --- a/src/frontends/qt4/GuiGraphics.cpp +++ b/src/frontends/qt4/GuiGraphics.cpp @@ -77,7 +77,7 @@ size_t const rorigin_size = sizeof(rorigin_lyx_strs) / sizeof(char *); static string const autostr = N_("automatically"); -} // namespace anon +} // namespace namespace lyx { diff --git a/src/frontends/qt4/GuiHyperlink.cpp b/src/frontends/qt4/GuiHyperlink.cpp index 4bf50a094a..e9c2965381 100644 --- a/src/frontends/qt4/GuiHyperlink.cpp +++ b/src/frontends/qt4/GuiHyperlink.cpp @@ -24,8 +24,8 @@ namespace lyx { namespace frontend { bool operator==(lyx::docstring const & d, char const * c) { return lyx::operator ==(d, c); } - } -} + } // namespace frontend +} // namespace lyx #endif diff --git a/src/frontends/qt4/GuiIdListModel.h b/src/frontends/qt4/GuiIdListModel.h index 3ada4e6226..03c891d8ef 100644 --- a/src/frontends/qt4/GuiIdListModel.h +++ b/src/frontends/qt4/GuiIdListModel.h @@ -121,6 +121,6 @@ private: }; -} -} +} // namespace frontend +} // namespace lyx #endif //GUIIDLISTMODEL_H diff --git a/src/frontends/qt4/GuiImage.cpp b/src/frontends/qt4/GuiImage.cpp index 08259ecd92..c73fe7cede 100644 --- a/src/frontends/qt4/GuiImage.cpp +++ b/src/frontends/qt4/GuiImage.cpp @@ -213,4 +213,4 @@ bool GuiImage::scale(Params const & params) } } // namespace graphics -} // lyx +} // namespace lyx diff --git a/src/frontends/qt4/GuiPrefs.cpp b/src/frontends/qt4/GuiPrefs.cpp index e33ce9b7ab..5f2f4740c4 100644 --- a/src/frontends/qt4/GuiPrefs.cpp +++ b/src/frontends/qt4/GuiPrefs.cpp @@ -2030,7 +2030,7 @@ string const l10n_shortcut(docstring const & prettyname, string const & shortcut return split(l10n_format, '|'); } -} // namespace anon +} // namespace void PrefFileformats::applyRC(LyXRC & rc) const @@ -2262,7 +2262,7 @@ namespace { } } } -} +} // namespace void PrefFileformats::updateViewers() diff --git a/src/frontends/qt4/GuiProgressView.cpp b/src/frontends/qt4/GuiProgressView.cpp index 1176dc44e9..3424d8f451 100644 --- a/src/frontends/qt4/GuiProgressView.cpp +++ b/src/frontends/qt4/GuiProgressView.cpp @@ -58,7 +58,7 @@ bool DebugSorter(DebugMap const & a, DebugMap const & b) { return a.second < b.second; } -} +} // namespace GuiProgressView::GuiProgressView(GuiView & parent, Qt::DockWidgetArea area, diff --git a/src/frontends/qt4/GuiSymbols.cpp b/src/frontends/qt4/GuiSymbols.cpp index f327bb5a64..d08689cd3c 100644 --- a/src/frontends/qt4/GuiSymbols.cpp +++ b/src/frontends/qt4/GuiSymbols.cpp @@ -192,7 +192,7 @@ QString getBlock(char_type c) } -} // namespace anon +} // namespace ///////////////////////////////////////////////////////////////////// diff --git a/src/frontends/qt4/GuiToolbar.cpp b/src/frontends/qt4/GuiToolbar.cpp index a21688693d..d519548e07 100644 --- a/src/frontends/qt4/GuiToolbar.cpp +++ b/src/frontends/qt4/GuiToolbar.cpp @@ -178,7 +178,7 @@ public: } }; -} +} // namespace MenuButton::MenuButton(GuiToolbar * bar, ToolbarItem const & item, bool const sticky) diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp index 5ff15c8e49..a257bb7268 100644 --- a/src/frontends/qt4/GuiView.cpp +++ b/src/frontends/qt4/GuiView.cpp @@ -263,7 +263,7 @@ typedef map ToolbarMap; typedef shared_ptr DialogPtr; -} // namespace anon +} // namespace class GuiView::GuiViewPrivate @@ -4358,7 +4358,7 @@ bool isValidName(string const & name) cmpCStr(name.c_str())) != end_dialognames; } -} // namespace anon +} // namespace void GuiView::resetDialogs() diff --git a/src/frontends/qt4/LengthCombo.h b/src/frontends/qt4/LengthCombo.h index f54d53157e..2545a96606 100644 --- a/src/frontends/qt4/LengthCombo.h +++ b/src/frontends/qt4/LengthCombo.h @@ -56,7 +56,7 @@ Q_SIGNALS: }; -} // namesapce frontend +} // namespace frontend } // namespace lyx #endif // LENGTHCOMBO_H diff --git a/src/frontends/qt4/Menus.cpp b/src/frontends/qt4/Menus.cpp index a279100c24..c97d23d44c 100644 --- a/src/frontends/qt4/Menus.cpp +++ b/src/frontends/qt4/Menus.cpp @@ -1890,7 +1890,7 @@ void MenuDefinition::expandEnvironmentSeparators(BufferView const * bv) } } -} // namespace anon +} // namespace ///////////////////////////////////////////////////////////////////// diff --git a/src/frontends/qt4/qt_helpers.cpp b/src/frontends/qt4/qt_helpers.cpp index 3d3e36819f..63125d8c5c 100644 --- a/src/frontends/qt4/qt_helpers.cpp +++ b/src/frontends/qt4/qt_helpers.cpp @@ -91,7 +91,7 @@ double locstringToDouble(QString const & str) return res; } -} // namespace anon +} // namespace namespace frontend { diff --git a/src/graphics/PreviewLoader.cpp b/src/graphics/PreviewLoader.cpp index 49b8b73b0a..22b0f23ead 100644 --- a/src/graphics/PreviewLoader.cpp +++ b/src/graphics/PreviewLoader.cpp @@ -160,8 +160,7 @@ typedef map InProgressProcesses; typedef InProgressProcesses::value_type InProgressProcess; -} // namespace anon - +} // namespace namespace lyx { @@ -379,7 +378,7 @@ void InProgress::stop() const } } -} // namespace anon +} // namespace namespace lyx { @@ -507,7 +506,7 @@ private: string const snippet_; }; -} // namespace anon +} // namespace PreviewLoader::Status PreviewLoader::Impl::status(string const & latex_snippet) const @@ -569,7 +568,7 @@ private: string const & snippet_; }; -} // namespace anon +} // namespace void PreviewLoader::Impl::remove(string const & latex_snippet) diff --git a/src/insets/ExternalSupport.cpp b/src/insets/ExternalSupport.cpp index 177ce4d60d..3a214ca8d0 100644 --- a/src/insets/ExternalSupport.cpp +++ b/src/insets/ExternalSupport.cpp @@ -75,7 +75,7 @@ string const subst_path(string const & input, return subst(input, placeholder, path2); } -} // namespace anon +} // namespace string const doSubstitution(InsetExternalParams const & params, @@ -348,7 +348,7 @@ string const substituteCommands(InsetExternalParams const & params, string const substituteOptions(InsetExternalParams const & params, string const & input, string const & format); -} // namespace anon +} // namespace void writeExternal(InsetExternalParams const & params, @@ -553,7 +553,7 @@ string const substituteOptions(InsetExternalParams const & params, return output; } -} // namespace anon +} // namespace } // namespace external diff --git a/src/insets/ExternalTemplate.cpp b/src/insets/ExternalTemplate.cpp index 651f2b61ec..ae9148b4e8 100644 --- a/src/insets/ExternalTemplate.cpp +++ b/src/insets/ExternalTemplate.cpp @@ -516,7 +516,7 @@ void setOptionFactory(Template::Format & format, string const & transform, transform_class_not_found(lyxerr, transformer_class); } -} // namespace anon +} // namespace void Template::Format::readFormat(Lexer & lex) diff --git a/src/insets/ExternalTransforms.cpp b/src/insets/ExternalTransforms.cpp index 2381241b9a..4f85f9d479 100644 --- a/src/insets/ExternalTransforms.cpp +++ b/src/insets/ExternalTransforms.cpp @@ -78,7 +78,7 @@ namespace { typedef Translator OriginTranslator; OriginTranslator const & originTranslator(); -} // namespace anon +} // namespace void RotationData::origin(string const & o) @@ -183,7 +183,7 @@ ostream & operator<<(ostream & os, RotationData::OriginType type) return os; } -} // namespace anon +} // namespace string const RotationLatexCommand::front_impl() const @@ -337,7 +337,7 @@ void extractIt(boost::any const & any_factory, transformer = factory(data); } -} // namespace anon +} // namespace TransformCommand::ptr_type @@ -426,7 +426,7 @@ OriginTranslator const & originTranslator() return translator; } -} // namespace anon +} // namespace } // namespace external } // namespace lyx diff --git a/src/insets/InsetBibtex.cpp b/src/insets/InsetBibtex.cpp index 4b9dab5d65..a905110773 100644 --- a/src/insets/InsetBibtex.cpp +++ b/src/insets/InsetBibtex.cpp @@ -642,7 +642,7 @@ namespace { return true; } -} +} // namespace void InsetBibtex::collectBibKeys(InsetIterator const & /*di*/) const diff --git a/src/insets/InsetBibtex.h b/src/insets/InsetBibtex.h index 038065ffc0..3ba96a29e8 100644 --- a/src/insets/InsetBibtex.h +++ b/src/insets/InsetBibtex.h @@ -21,7 +21,7 @@ class BiblioInfo; namespace support { class FileName; class FileNamePairList; -} +} // namespace support /** Used to insert BibTeX's information */ diff --git a/src/insets/InsetBox.cpp b/src/insets/InsetBox.cpp index 28d79c08de..90523c5c08 100644 --- a/src/insets/InsetBox.cpp +++ b/src/insets/InsetBox.cpp @@ -92,7 +92,7 @@ BoxTranslatorLoc const & boxtranslator_loc() return translator; } -} // namespace anon +} // namespace ///////////////////////////////////////////////////////////////////////// diff --git a/src/insets/InsetExternal.cpp b/src/insets/InsetExternal.cpp index 32075d4cf5..7123d81fe9 100644 --- a/src/insets/InsetExternal.cpp +++ b/src/insets/InsetExternal.cpp @@ -61,7 +61,7 @@ unsigned int const defaultLyxScale = 100; string defaultTemplateName; -} // namespace anon +} // namespace namespace lyx { @@ -148,7 +148,7 @@ void clearIfNotFound(T & data, external::TransformID value, data = T(); } -} // namespace anon +} // namespace void InsetExternalParams::settemplate(string const & name) @@ -414,8 +414,7 @@ docstring screenLabel(InsetExternalParams const & params, return gui; } -} // namespace anon - +} // namespace InsetExternal::InsetExternal(Buffer * buf) @@ -553,7 +552,7 @@ graphics::Params get_grfx_params(InsetExternalParams const & eparams) return gparams; } -} // namespace anon +} // namespace static bool isPreviewWanted(InsetExternalParams const & params) diff --git a/src/insets/InsetGraphics.cpp b/src/insets/InsetGraphics.cpp index 6e8ad051b8..3cc550b573 100644 --- a/src/insets/InsetGraphics.cpp +++ b/src/insets/InsetGraphics.cpp @@ -165,7 +165,7 @@ void readInsetGraphics(Lexer & lex, Buffer const & buf, bool allowOrigin, } } -} // namespace anon +} // namespace InsetGraphics::InsetGraphics(Buffer * buf) @@ -559,7 +559,7 @@ string const stripExtensionIfPossible(string const & file, string const & to, bo return latex_path(file, EXCLUDE_EXTENSION); } -} // namespace anon +} // namespace string InsetGraphics::prepareFile(OutputParams const & runparams) const diff --git a/src/insets/InsetGraphics.h b/src/insets/InsetGraphics.h index 88ded43e1b..5bd858a1a1 100644 --- a/src/insets/InsetGraphics.h +++ b/src/insets/InsetGraphics.h @@ -155,7 +155,7 @@ namespace graphics { void unifyGraphicsGroups(Buffer &, std::string const &); InsetGraphics * getCurrentGraphicsInset(Cursor const &); -} +} // namespace graphics } // namespace lyx diff --git a/src/insets/InsetIPAMacro.cpp b/src/insets/InsetIPAMacro.cpp index 06296ed3a1..cbc3abf525 100644 --- a/src/insets/InsetIPAMacro.cpp +++ b/src/insets/InsetIPAMacro.cpp @@ -94,7 +94,7 @@ IPACharTranslator const & ipachartranslator() return chartranslator; } -} // anon +} // namespace InsetIPADecoParams::InsetIPADecoParams() diff --git a/src/insets/InsetInclude.cpp b/src/insets/InsetInclude.cpp index e8f17503f6..f966fbcf30 100644 --- a/src/insets/InsetInclude.cpp +++ b/src/insets/InsetInclude.cpp @@ -165,7 +165,7 @@ InsetLabel * createLabel(Buffer * buf, docstring const & label_str) return new InsetLabel(buf, icp); } -} // namespace anon +} // namespace InsetInclude::InsetInclude(Buffer * buf, InsetCommandParams const & p) @@ -1209,7 +1209,7 @@ void add_preview(RenderMonitoredPreview & renderer, InsetInclude const & inset, } } -} // namespace anon +} // namespace void InsetInclude::addPreview(DocIterator const & /*inset_pos*/, diff --git a/src/insets/InsetIndex.cpp b/src/insets/InsetIndex.cpp index 0442536d1e..219954d4e3 100644 --- a/src/insets/InsetIndex.cpp +++ b/src/insets/InsetIndex.cpp @@ -690,7 +690,7 @@ bool operator<(IndexEntry const & lhs, IndexEntry const & rhs) return (comp < 0); } -} // anon namespace +} // namespace docstring InsetPrintIndex::xhtml(XHTMLStream &, OutputParams const & op) const diff --git a/src/insets/InsetInfo.cpp b/src/insets/InsetInfo.cpp index dc562d6f6d..42e0f6cda2 100644 --- a/src/insets/InsetInfo.cpp +++ b/src/insets/InsetInfo.cpp @@ -81,7 +81,7 @@ NameTranslator const & nameTranslator() return translator; } -} // namespace anon +} // namespace ///////////////////////////////////////////////////////////////////////// // diff --git a/src/insets/InsetLayout.cpp b/src/insets/InsetLayout.cpp index b27963d88e..621e784174 100644 --- a/src/insets/InsetLayout.cpp +++ b/src/insets/InsetLayout.cpp @@ -74,7 +74,7 @@ InsetLayout::InsetLaTeXType translateLaTeXType(std::string const & str) return InsetLayout::ILT_ERROR; } -} // namespace anon +} // namespace bool InsetLayout::read(Lexer & lex, TextClass const & tclass) diff --git a/src/insets/InsetListingsParams.cpp b/src/insets/InsetListingsParams.cpp index 1f1ad4a4d2..ea7eeb699f 100644 --- a/src/insets/InsetListingsParams.cpp +++ b/src/insets/InsetListingsParams.cpp @@ -959,7 +959,7 @@ bool ParValidator::onoff(string const & name) const return false; } -} // namespace anon. +} // namespace // define a global ParValidator ParValidator * par_validator = 0; diff --git a/src/insets/InsetNomencl.cpp b/src/insets/InsetNomencl.cpp index 74d1387599..6d234e6ab3 100644 --- a/src/insets/InsetNomencl.cpp +++ b/src/insets/InsetNomencl.cpp @@ -388,7 +388,7 @@ docstring nomenclWidest(Buffer const & buffer, OutputParams const & runparams) << "' in nomencl widest string!"); return latex_symb.first; } -} // namespace anon +} // namespace void InsetPrintNomencl::latex(otexstream & os, OutputParams const & runparams_in) const diff --git a/src/insets/InsetNote.cpp b/src/insets/InsetNote.cpp index 87dfdf2f43..1ee573c9e6 100644 --- a/src/insets/InsetNote.cpp +++ b/src/insets/InsetNote.cpp @@ -69,7 +69,7 @@ NoteTranslator const & notetranslator() } -} // anon +} // namespace InsetNoteParams::InsetNoteParams() diff --git a/src/insets/InsetPhantom.cpp b/src/insets/InsetPhantom.cpp index 8a156ea2f1..2a004fa6f8 100644 --- a/src/insets/InsetPhantom.cpp +++ b/src/insets/InsetPhantom.cpp @@ -85,7 +85,7 @@ PhantomTranslatorLoc const & phantomtranslator_loc() return translator; } -} // anon +} // namespace InsetPhantomParams::InsetPhantomParams() diff --git a/src/insets/InsetQuotes.cpp b/src/insets/InsetQuotes.cpp index 55d30bf26e..8292ec96c4 100644 --- a/src/insets/InsetQuotes.cpp +++ b/src/insets/InsetQuotes.cpp @@ -75,7 +75,7 @@ char const * const style_char = "esgpcaqbwfirjkx"; char const * const side_char = "lr" ; char const * const level_char = "sd"; -} // namespace anon +} // namespace ///////////////////////////////////////////////////////////////////// diff --git a/src/insets/InsetRef.cpp b/src/insets/InsetRef.cpp index d7df73c532..4a49cfbac8 100644 --- a/src/insets/InsetRef.cpp +++ b/src/insets/InsetRef.cpp @@ -84,7 +84,7 @@ void capitalize(docstring & s) { s[0] = t; } -} +} // namespace // the ref argument is the label name we are referencing. diff --git a/src/insets/InsetScript.cpp b/src/insets/InsetScript.cpp index fec226fe3a..44665a439b 100644 --- a/src/insets/InsetScript.cpp +++ b/src/insets/InsetScript.cpp @@ -81,7 +81,7 @@ ScriptTranslatorLoc const & scripttranslator_loc() return translator; } -} // anon +} // namespace InsetScriptParams::InsetScriptParams() diff --git a/src/insets/InsetSpecialChar.cpp b/src/insets/InsetSpecialChar.cpp index bbf54cf04c..1267a75b37 100644 --- a/src/insets/InsetSpecialChar.cpp +++ b/src/insets/InsetSpecialChar.cpp @@ -84,7 +84,7 @@ int logoWidth(FontInfo const & font, InsetSpecialChar::Kind kind) { return width; } -} +} // namespace docstring InsetSpecialChar::toolTip(BufferView const &, int, int) const { @@ -248,7 +248,7 @@ void drawLogo(PainterInfo & pi, int & x, int const y, InsetSpecialChar::Kind kin } } -} +} // namespace void InsetSpecialChar::draw(PainterInfo & pi, int x, int y) const { diff --git a/src/insets/InsetTOC.cpp b/src/insets/InsetTOC.cpp index 3726c05904..29b7540cc2 100644 --- a/src/insets/InsetTOC.cpp +++ b/src/insets/InsetTOC.cpp @@ -45,7 +45,7 @@ string cmd2type(string const & cmd) return "listing"; return cmd; } -} +} // namespace InsetTOC::InsetTOC(Buffer * buf, InsetCommandParams const & p) diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp index 5083ebd6b8..891d932eb7 100644 --- a/src/insets/InsetTabular.cpp +++ b/src/insets/InsetTabular.cpp @@ -1146,7 +1146,7 @@ void toggleFixedWidth(Cursor & cur, InsetTableCell * inset, bool fixedWidth) cur.pop(); } -} +} // namespace void Tabular::setColumnPWidth(Cursor & cur, idx_type cell, diff --git a/src/insets/InsetVSpace.cpp b/src/insets/InsetVSpace.cpp index 65ea92b8a0..4cdd1ba6ed 100644 --- a/src/insets/InsetVSpace.cpp +++ b/src/insets/InsetVSpace.cpp @@ -46,7 +46,7 @@ namespace { int const ADD_TO_VSPACE_WIDTH = 5; -} // namespace anon +} // namespace InsetVSpace::InsetVSpace(VSpace const & space) diff --git a/src/insets/RenderGraphic.cpp b/src/insets/RenderGraphic.cpp index d48e4771e9..52e9803133 100644 --- a/src/insets/RenderGraphic.cpp +++ b/src/insets/RenderGraphic.cpp @@ -132,7 +132,7 @@ bool readyToDisplay(graphics::Loader const & loader) return loader.image()->isDrawable(); } -} // namespace anon +} // namespace void RenderGraphic::metrics(MetricsInfo & mi, Dimension & dim) const diff --git a/src/insets/RenderPreview.cpp b/src/insets/RenderPreview.cpp index 64a5eb58ad..df0ac64d7e 100644 --- a/src/insets/RenderPreview.cpp +++ b/src/insets/RenderPreview.cpp @@ -116,7 +116,7 @@ docstring const statusMessage(BufferView const * bv, string const & snippet) return message; } -} // namespace anon +} // namespace graphics::PreviewImage const * diff --git a/src/lengthcommon.cpp b/src/lengthcommon.cpp index 9665e09fe2..f71d009dbd 100644 --- a/src/lengthcommon.cpp +++ b/src/lengthcommon.cpp @@ -204,7 +204,7 @@ LaTeXLength table[] = { }; -} // namespace anon +} // namespace const char * stringFromUnit(int unit) diff --git a/src/lyxfind.cpp b/src/lyxfind.cpp index 3c30d23f74..4b8da77ac0 100644 --- a/src/lyxfind.cpp +++ b/src/lyxfind.cpp @@ -303,7 +303,7 @@ pair replaceOne(BufferView * bv, docstring searchstr, return make_pair(true, 1); } -} // namespace anon +} // namespace docstring const find2string(docstring const & search, @@ -517,7 +517,7 @@ bool findChange(BufferView * bv, bool forward) return selectChange(cur, forward); } -} +} // namespace bool findNextChange(BufferView * bv) { @@ -1338,7 +1338,7 @@ int findBackwardsAdv(DocIterator & cur, MatchStringAdv & match) } -} // anonym namespace +} // namespace docstring stringifyFromForSearch(FindAndReplaceOptions const & opt, @@ -1419,7 +1419,7 @@ static void changeFirstCase(Buffer & buffer, TextCase first_case, TextCase other pit->changeCase(buffer.params(), pos_type(1), right, others_case); } -} // anon namespace +} // namespace /// static void findAdvReplace(BufferView * bv, FindAndReplaceOptions const & opt, MatchStringAdv & matchAdv) @@ -1612,4 +1612,4 @@ istringstream & operator>>(istringstream & is, FindAndReplaceOptions & opt) return is; } -} // lyx namespace +} // namespace lyx diff --git a/src/mathed/InsetMathDecoration.cpp b/src/mathed/InsetMathDecoration.cpp index 4779249891..908a887eeb 100644 --- a/src/mathed/InsetMathDecoration.cpp +++ b/src/mathed/InsetMathDecoration.cpp @@ -209,7 +209,7 @@ namespace { buildTranslationMap(t); return t; } -} +} // namespace void InsetMathDecoration::mathmlize(MathStream & os) const { diff --git a/src/mathed/InsetMathFrac.cpp b/src/mathed/InsetMathFrac.cpp index 9e4f25bbbd..90d61913a6 100644 --- a/src/mathed/InsetMathFrac.cpp +++ b/src/mathed/InsetMathFrac.cpp @@ -171,8 +171,7 @@ latexkeys const * slash_symbol() return in_word_set(from_ascii("slash")); } -} // anon namespace - +} // namespace void InsetMathFrac::metrics(MetricsInfo & mi, Dimension & dim) const diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp index f4005d9124..01501929c6 100644 --- a/src/mathed/InsetMathHull.cpp +++ b/src/mathed/InsetMathHull.cpp @@ -151,7 +151,7 @@ namespace { } -} // end anon namespace +} // namespace HullType hullType(docstring const & s) @@ -280,7 +280,7 @@ void InsetMathHull::setBuffer(Buffer & buffer) namespace { const char * counters_to_save[] = {"section", "chapter"}; unsigned int const numcnts = sizeof(counters_to_save)/sizeof(char *); -} +} // namespace void InsetMathHull::updateBuffer(ParIterator const & it, UpdateType utype) @@ -2020,7 +2020,7 @@ bool allowDisplayMath(Cursor const & cur) return tmpcur.getStatus(cmd, status) && status.enabled(); } -} +} // namespace bool InsetMathHull::getStatus(Cursor & cur, FuncRequest const & cmd, diff --git a/src/mathed/InsetMathSideset.cpp b/src/mathed/InsetMathSideset.cpp index 2638fefdb8..cdc5637282 100644 --- a/src/mathed/InsetMathSideset.cpp +++ b/src/mathed/InsetMathSideset.cpp @@ -36,7 +36,7 @@ using namespace std; namespace { /// x spacing between the nucleus and the scripts int const dx = 2; -} +} // namespace namespace lyx { diff --git a/src/mathed/InsetMathSpace.cpp b/src/mathed/InsetMathSpace.cpp index 4f88ecd04d..88aae1d4a6 100644 --- a/src/mathed/InsetMathSpace.cpp +++ b/src/mathed/InsetMathSpace.cpp @@ -75,7 +75,7 @@ SpaceInfo space_info[] = { int const nSpace = sizeof(space_info)/sizeof(SpaceInfo); int const defaultSpace = 4; -} // anon namespace +} // namespace InsetMathSpace::InsetMathSpace() : space_(defaultSpace) diff --git a/src/mathed/MathAutoCorrect.cpp b/src/mathed/MathAutoCorrect.cpp index 8f1d5b8f40..fc4ad440d2 100644 --- a/src/mathed/MathAutoCorrect.cpp +++ b/src/mathed/MathAutoCorrect.cpp @@ -169,7 +169,7 @@ void initAutoCorrect() } -} // namespace anon +} // namespace bool math_autocorrect(MathAtom & at, char_type c) diff --git a/src/mathed/MathExtern.cpp b/src/mathed/MathExtern.cpp index 425e260f38..52fa0cf0fa 100644 --- a/src/mathed/MathExtern.cpp +++ b/src/mathed/MathExtern.cpp @@ -1391,9 +1391,9 @@ namespace { return res; } -} +} // namespace -} // anon namespace +} // namespace void write(MathData const & dat, WriteStream & wi) { diff --git a/src/mathed/MathFactory.cpp b/src/mathed/MathFactory.cpp index cebac7c9cc..2d65f78d49 100644 --- a/src/mathed/MathFactory.cpp +++ b/src/mathed/MathFactory.cpp @@ -347,7 +347,7 @@ bool isSpecialChar(docstring const & name) } -} // namespace anon +} // namespace MathWordList const & mathedWordList() { diff --git a/src/mathed/MathRow.cpp b/src/mathed/MathRow.cpp index 8d76265be1..71e7a5234a 100644 --- a/src/mathed/MathRow.cpp +++ b/src/mathed/MathRow.cpp @@ -140,7 +140,7 @@ void drawMarkers(PainterInfo const & pi, MathRow::Element const & e, } } -} +} // namespace MathRow::MathRow(MetricsInfo & mi, MathData const * ar) diff --git a/src/mathed/MathSupport.cpp b/src/mathed/MathSupport.cpp index 086d219c56..bb6a21c74d 100644 --- a/src/mathed/MathSupport.cpp +++ b/src/mathed/MathSupport.cpp @@ -505,7 +505,7 @@ deco_struct const * search_deco(docstring const & name) } -} // namespace anon +} // namespace int mathed_font_em(FontInfo const & font) diff --git a/src/output.cpp b/src/output.cpp index f1369e5790..c06cd9efa4 100644 --- a/src/output.cpp +++ b/src/output.cpp @@ -40,7 +40,7 @@ bool doOpenFileWrite(OFStream & ofs, FileName const & fname) return false; } -} +} // namespace bool openFileWrite(ofstream & ofs, FileName const & fname) diff --git a/src/output_docbook.cpp b/src/output_docbook.cpp index 3cf2b9a954..6ed409c5dd 100644 --- a/src/output_docbook.cpp +++ b/src/output_docbook.cpp @@ -312,7 +312,7 @@ ParagraphList::const_iterator makeCommand( return pend; } -} // end anonym namespace +} // namespace void docbookParagraphs(Text const & text, diff --git a/src/output_latex.cpp b/src/output_latex.cpp index 3f608edbb7..4ef1d45624 100644 --- a/src/output_latex.cpp +++ b/src/output_latex.cpp @@ -510,7 +510,7 @@ void getArgInsets(otexstream & os, OutputParams const & runparams, Layout::LaTeX } -} // namespace anon +} // namespace void pushLanguageName(string const & lang_name, bool localswitch) @@ -563,7 +563,7 @@ void addArgInsets(Paragraph const & par, string const & prefix, } } -} // anon namespace +} // namespace void latexArgInsets(Paragraph const & par, otexstream & os, @@ -666,7 +666,7 @@ void parStartCommand(Paragraph const & par, otexstream & os, } } -} // namespace anon +} // namespace // FIXME: this should be anonymous void TeXOnePar(Buffer const & buf, diff --git a/src/output_xhtml.cpp b/src/output_xhtml.cpp index 27d8029d13..bfe375ffa2 100644 --- a/src/output_xhtml.cpp +++ b/src/output_xhtml.cpp @@ -328,7 +328,7 @@ void XHTMLStream::writeError(std::string const & s) const namespace { // an illegal tag for internal use static html::StartTag const parsep_tag("&LyX_parsep_tag&"); -} +} // namespace bool XHTMLStream::closeFontTags() diff --git a/src/support/Changer.h b/src/support/Changer.h index 9d85c26200..2de7520341 100644 --- a/src/support/Changer.h +++ b/src/support/Changer.h @@ -29,6 +29,6 @@ struct Revertible { typedef unique_ptr Changer; -} +} // namespace lyx #endif //LYX_CHANGER_H diff --git a/src/support/ForkedCalls.cpp b/src/support/ForkedCalls.cpp index f6b14e0df4..f81c1d20a9 100644 --- a/src/support/ForkedCalls.cpp +++ b/src/support/ForkedCalls.cpp @@ -94,7 +94,7 @@ private: pid_t pid_; }; -} // namespace anon +} // namespace ///////////////////////////////////////////////////////////////////// @@ -513,8 +513,7 @@ bool running() return running_; } -} // namespace ForkedCallsQueue - +} // namespace ForkedCallQueue ///////////////////////////////////////////////////////////////////// diff --git a/src/support/ForkedCalls.h b/src/support/ForkedCalls.h index 452c9792c4..8a4bf1d4aa 100644 --- a/src/support/ForkedCalls.h +++ b/src/support/ForkedCalls.h @@ -201,7 +201,7 @@ ForkedCall::sigPtr add(std::string const & process); /// Query whether the queue is running a forked process now. bool running(); -} +} // namespace ForkedCallQueue /** diff --git a/src/support/Messages.cpp b/src/support/Messages.cpp index da1c3cc0b8..26a320b2d2 100644 --- a/src/support/Messages.cpp +++ b/src/support/Messages.cpp @@ -127,7 +127,7 @@ void cleanTranslation(docstring & trans) } } -} // lyx +} // namespace lyx #ifdef ENABLE_NLS @@ -167,7 +167,7 @@ string realCode(string code) } return string(); } -} +} // namespace bool Messages::available(string const & c) @@ -238,7 +238,7 @@ void StringTable::swapEnd() } -} // namespace anon +} // namespace bool Messages::readMoFile() { diff --git a/src/support/Package.cpp b/src/support/Package.cpp index 75d6e1a2f8..4b91bba79a 100644 --- a/src/support/Package.cpp +++ b/src/support/Package.cpp @@ -55,7 +55,7 @@ namespace { Package package_; bool initialised_ = false; -} // namespace anon +} // namespace void init_package(string const & command_line_arg0, @@ -101,7 +101,7 @@ string const & with_version_suffix(); string const fix_dir_name(string const & name); -} // namespace anon +} // namespace Package::Package(string const & command_line_arg0, @@ -247,7 +247,7 @@ string const & with_version_suffix() return program_suffix.empty() ? program_suffix : with_version_suffix; } -} // namespace anon +} // namespace FileName const & Package::top_srcdir() @@ -799,7 +799,7 @@ string const relative_system_support_dir() return result; } -} // namespace anon +} // namespace } // namespace support } // namespace lyx diff --git a/src/support/RefChanger.h b/src/support/RefChanger.h index a61abbd72b..65bb78106c 100644 --- a/src/support/RefChanger.h +++ b/src/support/RefChanger.h @@ -78,7 +78,7 @@ RefChanger make_change(X & ref, X const val) } -} +} // namespace lyx #endif //LYX_REFCHANGER_H diff --git a/src/support/Systemcall.cpp b/src/support/Systemcall.cpp index 392f296e4c..2dbbba7c83 100644 --- a/src/support/Systemcall.cpp +++ b/src/support/Systemcall.cpp @@ -231,8 +231,7 @@ string const parsecmd(string const & incmd, string & infile, string & outfile, return trim(outcmd[0]); } -} // namespace anon - +} // namespace int Systemcall::startscript(Starttype how, string const & what, @@ -410,7 +409,7 @@ bool queryStopCommand(QString const & cmd) 1, 1, _("&Stop it"), _("Let it &run")) == 0; } -} +} // namespace bool SystemcallPrivate::waitWhile(State waitwhile, bool process_events, int timeout) diff --git a/src/support/bind.h b/src/support/bind.h index 5a734ff931..e9b6a63277 100644 --- a/src/support/bind.h +++ b/src/support/bind.h @@ -20,7 +20,7 @@ namespace lyx using std::placeholders::_2; using std::bind; using std::ref; -} +} // namespace #endif diff --git a/src/support/convert.cpp b/src/support/convert.cpp index f95aa4b9d4..b1c554e083 100644 --- a/src/support/convert.cpp +++ b/src/support/convert.cpp @@ -37,7 +37,7 @@ To lexical_cast(From const & value, To const & defaultResult = To()) } } -} +} // namespace namespace lyx { diff --git a/src/support/debug.cpp b/src/support/debug.cpp index 16e3c79694..3026df09f2 100644 --- a/src/support/debug.cpp +++ b/src/support/debug.cpp @@ -77,7 +77,7 @@ DebugErrorItem errorTags[] = { int const numErrorTags = sizeof(errorTags)/sizeof(errorTags[0]); -} // namespace anon +} // namespace int Debug::levelCount() diff --git a/src/support/debug.h b/src/support/debug.h index 16c4600e90..f6b06d5c3e 100644 --- a/src/support/debug.h +++ b/src/support/debug.h @@ -28,7 +28,7 @@ class ios_base; template class basic_streambuf; typedef basic_streambuf > streambuf; -} +} // namespace std #endif diff --git a/src/support/docstream.cpp b/src/support/docstream.cpp index 6642e09d5f..04b57045b2 100644 --- a/src/support/docstream.cpp +++ b/src/support/docstream.cpp @@ -307,7 +307,7 @@ private: string encoding_; }; -} // namespace anon +} // namespace namespace lyx { @@ -447,7 +447,7 @@ odocstream & operator<<(odocstream & os, char c) } #endif -} +} // namespace lyx #if ! defined(USE_WCHAR_T) && defined(__GNUC__) diff --git a/src/support/docstream.h b/src/support/docstream.h index 460a9b7393..409c7557a8 100644 --- a/src/support/docstream.h +++ b/src/support/docstream.h @@ -114,6 +114,6 @@ SetEnc setEncoding(std::string const & encoding); odocstream & operator<<(odocstream & os, SetEnc e); idocstream & operator<<(idocstream & os, SetEnc e); -} +} // namespace lyx #endif diff --git a/src/support/docstring.cpp b/src/support/docstring.cpp index 95c86b3665..496d4c0242 100644 --- a/src/support/docstring.cpp +++ b/src/support/docstring.cpp @@ -273,7 +273,7 @@ template<> char ctype::do_narrow(const lyx::char_type, char) const { return 0; } template<> const lyx::char_type * ctype::do_narrow(const lyx::char_type *, const lyx::char_type *, char, char *) const { return 0; } -} +} // namespace std namespace lyx { @@ -820,6 +820,6 @@ namespace { /// make sure that our facets get used static locale_initializer initializer; -} -} +} // namespace +} // namespace lyx #endif diff --git a/src/support/lstrings.cpp b/src/support/lstrings.cpp index 8ffab19c7e..68a70a9bb7 100644 --- a/src/support/lstrings.cpp +++ b/src/support/lstrings.cpp @@ -79,7 +79,7 @@ inline QChar const ucs4_to_qchar(char_type const ucs4) /// Maximum valid UCS4 code point char_type const ucs4_max = 0x10ffff; -} // anon namespace +} // namespace bool isLetterChar(char_type c) @@ -233,7 +233,7 @@ Char ascii_tolower(Char c) { return c; } -} +} // namespace int compare_ascii_no_case(string const & s, string const & s2) @@ -494,7 +494,7 @@ template struct local_ascii_lowercase { Char operator()(Char c) const { return ascii_tolower(c); } }; -} // end of anon namespace +} // namespace docstring const lowercase(docstring const & a) @@ -892,7 +892,7 @@ docstring const subst_string(docstring const & a, return lstr; } -} +} // namespace string const subst(string const & a, char oldchar, char newchar) @@ -1108,7 +1108,7 @@ docstring const doSplit(docstring const & a, docstring & piece, Char delim) return tmp; } -} // anon +} // namespace string const split(string const & a, string & piece, char delim) @@ -1259,7 +1259,7 @@ vector wrapToVec(docstring const & str, int ind, return retval; } -} +} // namespace docstring wrap(docstring const & str, int const ind, size_t const width) @@ -1367,7 +1367,7 @@ template const String return str; } -} // namespace anon +} // namespace vector const getVectorFromString(string const & str, diff --git a/src/support/numpunct_lyx_char_type.h b/src/support/numpunct_lyx_char_type.h index 7ec661c29f..9e4dbe2d75 100644 --- a/src/support/numpunct_lyx_char_type.h +++ b/src/support/numpunct_lyx_char_type.h @@ -54,5 +54,5 @@ namespace std // Fixed in VC11: // http://connect.microsoft.com/VisualStudio/feedback/details/572376/msvc10-c-std-numpunct-has-a-hardcoded-dllimport-in-definition -} +} // namespace std #endif diff --git a/src/support/os.cpp b/src/support/os.cpp index 5ee2bf9027..ec84ed1394 100644 --- a/src/support/os.cpp +++ b/src/support/os.cpp @@ -104,6 +104,6 @@ string const python(bool reset) return command; } -} -} -} +} // namespace os +} // namespace support +} // namespace lyx diff --git a/src/support/os_cygwin.cpp b/src/support/os_cygwin.cpp index 1de0da6ef1..64436f115a 100644 --- a/src/support/os_cygwin.cpp +++ b/src/support/os_cygwin.cpp @@ -208,7 +208,7 @@ BOOL terminate_handler(DWORD event) return FALSE; } -} // namespace anon +} // namespace void init(int argc, char ** argv[]) { diff --git a/src/support/os_unix.cpp b/src/support/os_unix.cpp index 7afa5db48e..5a6c21fe63 100644 --- a/src/support/os_unix.cpp +++ b/src/support/os_unix.cpp @@ -43,7 +43,7 @@ namespace { int argc_ = 0; char ** argv_ = 0; -} // namespace anon +} // namespace void init(int argc, char ** argv[]) { diff --git a/src/support/os_win32.cpp b/src/support/os_win32.cpp index 9078f594d7..8d521383f2 100644 --- a/src/support/os_win32.cpp +++ b/src/support/os_win32.cpp @@ -97,7 +97,7 @@ BOOL terminate_handler(DWORD event) return FALSE; } -} // namespace anon +} // namespace void init(int argc, char ** argv[]) { diff --git a/src/support/pmprof.h b/src/support/pmprof.h index 362c12d38f..d20d4bb020 100644 --- a/src/support/pmprof.h +++ b/src/support/pmprof.h @@ -154,7 +154,7 @@ void dump(long long sec, long long usec, unsigned long long count) { << std::endl; } -} +} // namespace /* Helper class for gathering data. Instantiate this as a static diff --git a/src/support/regex.h b/src/support/regex.h index 615fe4f2d2..96498708fc 100644 --- a/src/support/regex.h +++ b/src/support/regex.h @@ -37,9 +37,9 @@ namespace regex_constants { using namespace LR_NS::regex_constants; using LR_NS::regex_constants::match_flag_type; -} +} // namespace regex_constants -} +} // namespace lyx #undef LR_NS diff --git a/src/support/strfwd.h b/src/support/strfwd.h index 58b44f59b3..c7e9c55517 100644 --- a/src/support/strfwd.h +++ b/src/support/strfwd.h @@ -63,7 +63,7 @@ typedef basic_istream > istream; typedef basic_ostream > ostream; typedef basic_ostringstream, allocator > ostringstream; -} // namepace std +} // namespace std #endif diff --git a/src/support/tests/dummy_functions.cpp b/src/support/tests/dummy_functions.cpp index 2b0f21710a..b7dcf6f687 100644 --- a/src/support/tests/dummy_functions.cpp +++ b/src/support/tests/dummy_functions.cpp @@ -53,7 +53,7 @@ namespace lyx { class FontMetrics { int em() const { return 0; }; }; - } + } // namespace frontend class FontInfo; @@ -61,4 +61,4 @@ namespace lyx { static frontend::FontMetrics dummy; return dummy; } -} +} // namespace lyx diff --git a/src/support/unicode.cpp b/src/support/unicode.cpp index 2620ddb5e4..b583982740 100644 --- a/src/support/unicode.cpp +++ b/src/support/unicode.cpp @@ -193,7 +193,7 @@ iconv_convert(IconvProcessor & processor, InType const * buf, size_t buflen) return vector(tmp, tmp + bytes / sizeof(RetType)); } -} // anon namespace +} // namespace IconvProcessor & utf8ToUcs4() @@ -264,7 +264,7 @@ IconvProcessor & getProc(map & processors, return it->second; } -} //anon namespace +} // namespace vector @@ -313,7 +313,7 @@ map & ucs4To8bitProcessors() return *processors.localData(); } -} +} // namespace vector ucs4_to_eightbit(char_type const * ucs4str, size_t ls, string const & encoding) diff --git a/src/support/unique_ptr.h b/src/support/unique_ptr.h index f9e049ca0e..46f3bdd8b3 100644 --- a/src/support/unique_ptr.h +++ b/src/support/unique_ptr.h @@ -48,7 +48,7 @@ template struct _Unique_if { typedef void _Known_bound; }; -} //anon namespace +} // namespace template typename _Unique_if::_Single_object diff --git a/src/tests/check_layout.cpp b/src/tests/check_layout.cpp index 646108c3b7..7100c712d8 100644 --- a/src/tests/check_layout.cpp +++ b/src/tests/check_layout.cpp @@ -25,8 +25,8 @@ void warning(docstring const & title, docstring const & message, bool const &) LYXERR0(title); LYXERR0(message); } -} -} +} // namespace Alert +} // namespace frontend bool LaTeXFeatures::isAvailable(std::string const &) { @@ -38,7 +38,7 @@ bool Formats::isZippedFile(support::FileName const &) const { return false; } -} +} // namespace lyx using namespace lyx::support; diff --git a/src/tests/dummy_functions.cpp b/src/tests/dummy_functions.cpp index 0384b6efa0..a265ec0e8f 100644 --- a/src/tests/dummy_functions.cpp +++ b/src/tests/dummy_functions.cpp @@ -56,7 +56,7 @@ namespace lyx { class FontMetrics { int em() const { return 0; }; }; - } + } // namespace frontend class FontInfo; @@ -64,4 +64,4 @@ namespace lyx { static frontend::FontMetrics dummy; return dummy; } -} +} // namespace lyx diff --git a/src/tex2lyx/Context.cpp b/src/tex2lyx/Context.cpp index 5a04cde46e..61685180bd 100644 --- a/src/tex2lyx/Context.cpp +++ b/src/tex2lyx/Context.cpp @@ -41,7 +41,7 @@ void end_deeper(ostream & os) os << "\n\\end_deeper"; } -} +} // namespace bool operator==(TeXFont const & f1, TeXFont const & f2) diff --git a/src/tex2lyx/Parser.cpp b/src/tex2lyx/Parser.cpp index 894aaf7e26..ec63b77da8 100644 --- a/src/tex2lyx/Parser.cpp +++ b/src/tex2lyx/Parser.cpp @@ -48,7 +48,7 @@ char_type getNewline(iparserdocstream & is, char_type c) return c; } -} +} // namespace // // Token diff --git a/src/tex2lyx/dummy_impl.cpp b/src/tex2lyx/dummy_impl.cpp index 7c3bc4741b..15fbf8b3f3 100644 --- a/src/tex2lyx/dummy_impl.cpp +++ b/src/tex2lyx/dummy_impl.cpp @@ -42,8 +42,8 @@ namespace Alert { { cerr << to_utf8(title) << "\n" << to_utf8(message) << endl; } -} -} +} // namespace Alert +} // namespace frontend // @@ -120,7 +120,7 @@ namespace frontend { class FontMetrics { int em() const { return 0; }; }; -} +} // namespace frontend class FontInfo; @@ -136,4 +136,4 @@ frontend::FontMetrics const & theFontMetrics(FontInfo const &) { void lyx_exit(int) {} -} +} // namespace lyx diff --git a/src/tex2lyx/tex2lyx.cpp b/src/tex2lyx/tex2lyx.cpp index 65a2b91ea2..3c0bf819d3 100644 --- a/src/tex2lyx/tex2lyx.cpp +++ b/src/tex2lyx/tex2lyx.cpp @@ -312,7 +312,7 @@ bool addModule(string const & module) return false; } -} +} // namespace bool checkModule(string const & name, bool command) diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp index 2e7f08a596..2fe40bde05 100644 --- a/src/tex2lyx/text.cpp +++ b/src/tex2lyx/text.cpp @@ -429,7 +429,7 @@ bool translate_len(string const & length, string & valstring, string & unit) return true; } -} +} // namespace string translate_len(string const & length) diff --git a/src/texstream.cpp b/src/texstream.cpp index b31cafb0af..f8f298bdaf 100644 --- a/src/texstream.cpp +++ b/src/texstream.cpp @@ -355,4 +355,4 @@ template otexstream & operator<< (otexstream &, unsigned long); template otexstream & operator<< (otexstream &, unsigned long long); #endif -} +} // namespace lyx diff --git a/src/texstream.h b/src/texstream.h index bf4eb38bba..2cfcd16da4 100644 --- a/src/texstream.h +++ b/src/texstream.h @@ -183,6 +183,6 @@ template otexstream & operator<<(otexstream & ots, Type value); -} +} // namespace lyx #endif diff --git a/src/update_flags.h b/src/update_flags.h index 2950a894d1..3e877c1ca1 100644 --- a/src/update_flags.h +++ b/src/update_flags.h @@ -40,7 +40,7 @@ inline flags operator&(flags const f, flags const g) return static_cast(int(f) & int(g)); } -} // namespace +} // namespace Update } // namespace lyx #endif