22.09.2015, 14:45, "Lorenz Haas" <[email protected]>: >> I don't know, but shouldn't the "static" keyword be preferred anyway due >> to being less noisy? > > Okay, beside the theoretical question, let's make it concrete -and > clear-: > https://github.com/qtproject/qt-creator/blob/51bb52139c479cca2dae82eb08aeb8d04718fca1/src/plugins/beautifier/artisticstyle/artisticstylesettings.cpp#L52 > Should it be: > > a) namespace { const char kUseOtherFiles[] = "useOtherFiles"; } > b) namespace { static const char kUseOtherFiles[] = "useOtherFiles"; } > c) static const char kUseOtherFiles[] = "useOtherFiles"; > > So one should favor c, right? >
You should favor d) const char kUseOtherFiles[] = "useOtherFiles"; because constants have internal linkage by default. -- Regards, Konstantin _______________________________________________ Qt-creator mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/qt-creator
