Files
sousa-gecko/xpcom/threads/nsEnvironment.h
T
serge-sans-paille 438b5cd118 Bug 2034839 - Make xpcom/ headers compatible with current static analysis r=xpcom-reviewers,mccr8
- use = default when relevant
- use = delete on public method instead of unimplemented private
- replace an invalid std::move by a correct std::forward (it's a
  bugpit!)

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/bugprone/move-forwarding-reference.html

That we already use on source files

Differential Revision: https://phabricator.services.mozilla.com/D296613
2026-04-28 16:15:17 +00:00

31 lines
834 B
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 nsEnvironment_h_
#define nsEnvironment_h_
#include "mozilla/Mutex.h"
#include "nsIEnvironment.h"
#define NS_ENVIRONMENT_CID \
{0X3D68F92UL, \
0X9513, \
0X4E25, \
{0X9B, 0XE9, 0X7C, 0XB2, 0X39, 0X87, 0X41, 0X72}}
#define NS_ENVIRONMENT_CONTRACTID "@mozilla.org/process/environment;1"
class nsEnvironment final : public nsIEnvironment {
public:
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIENVIRONMENT
static nsresult Create(REFNSIID aIID, void** aResult);
private:
nsEnvironment() = default;
~nsEnvironment() = default;
};
#endif /* !nsEnvironment_h_ */