- use = default when relevant - use = delete on public method instead of unimplemented private - use range-based loop This matches the clang-tidy rules: - https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-equals-default.html - https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-equals-delete.html - https://clang.llvm.org/extra/clang-tidy/checks/modernize/loop-convert.html Also had to do minor header tweaking to cope with std::size_t with size_t in the process. That we already use on source files Differential Revision: https://phabricator.services.mozilla.com/D296635
30 lines
1.0 KiB
C++
30 lines
1.0 KiB
C++
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#ifndef nsParserMsgUtils_h
|
|
#define nsParserMsgUtils_h
|
|
|
|
#include "nsString.h"
|
|
|
|
#define XMLPARSER_PROPERTIES \
|
|
"chrome://global/locale/layout/xmlparser.properties"
|
|
|
|
#define XMLPARSER_PROPERTIES_en_US \
|
|
"resource://gre/res/locale/layout/xmlparser.properties"
|
|
|
|
class nsParserMsgUtils {
|
|
public:
|
|
static nsresult GetLocalizedStringByName(const char* aPropFileName,
|
|
const char* aKey, nsString& aVal);
|
|
static nsresult GetLocalizedStringByID(const char* aPropFileName,
|
|
uint32_t aID, nsString& aVal);
|
|
|
|
nsParserMsgUtils() = delete; // Currently this is not meant to be created,
|
|
// use the static methods
|
|
~nsParserMsgUtils() =
|
|
delete; // If perf required, change this to cache values etc.
|
|
};
|
|
|
|
#endif
|