Procházet zdrojové kódy

program_metadata: Explicitly specify copy/move functions

The generation of the copy assignment operators are deprecated on being
generated when a user-provided destructor is present.

We can explicitly specify that we desire this behavior to keep the class
forward compatible with future standards.
Lioncash před 5 roky
rodič
revize
ae93402312
1 změnil soubory, kde provedl 6 přidání a 0 odebrání
  1. 6 0
      src/core/file_sys/program_metadata.h

+ 6 - 0
src/core/file_sys/program_metadata.h

@@ -44,6 +44,12 @@ public:
     ProgramMetadata();
     ~ProgramMetadata();
 
+    ProgramMetadata(const ProgramMetadata&) = default;
+    ProgramMetadata& operator=(const ProgramMetadata&) = default;
+
+    ProgramMetadata(ProgramMetadata&&) = default;
+    ProgramMetadata& operator=(ProgramMetadata&&) = default;
+
     /// Gets a default ProgramMetadata configuration, should only be used for homebrew formats where
     /// we do not have an NPDM file
     static ProgramMetadata GetDefault();