diff options
| author | 2020-06-03 16:33:38 +1000 | |
|---|---|---|
| committer | 2020-06-03 16:33:38 +1000 | |
| commit | 411f5527d41ba5c4f09b914b4fb4df0c6493f744 (patch) | |
| tree | de34bb541a8d2fa4a3ff411dccb2aef8a5a24574 /src/video_core/macro/macro.h | |
| parent | Pass by reference instead of copying parameters (diff) | |
| download | yuzu-411f5527d41ba5c4f09b914b4fb4df0c6493f744.tar.gz yuzu-411f5527d41ba5c4f09b914b4fb4df0c6493f744.tar.xz yuzu-411f5527d41ba5c4f09b914b4fb4df0c6493f744.zip | |
Mark parameters as const
Diffstat (limited to 'src/video_core/macro/macro.h')
| -rw-r--r-- | src/video_core/macro/macro.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/video_core/macro/macro.h b/src/video_core/macro/macro.h index 49fc4d6bc..b76ed891f 100644 --- a/src/video_core/macro/macro.h +++ b/src/video_core/macro/macro.h | |||
| @@ -102,7 +102,7 @@ public: | |||
| 102 | * @param code The macro byte code to execute | 102 | * @param code The macro byte code to execute |
| 103 | * @param parameters The parameters of the macro | 103 | * @param parameters The parameters of the macro |
| 104 | */ | 104 | */ |
| 105 | virtual void Execute(std::vector<u32>& parameters, u32 method) = 0; | 105 | virtual void Execute(const std::vector<u32>& parameters, u32 method) = 0; |
| 106 | }; | 106 | }; |
| 107 | 107 | ||
| 108 | class MacroEngine { | 108 | class MacroEngine { |
| @@ -113,7 +113,7 @@ public: | |||
| 113 | void AddCode(u32 method, u32 data); | 113 | void AddCode(u32 method, u32 data); |
| 114 | 114 | ||
| 115 | // Compiles the macro if its not in the cache, and executes the compiled macro | 115 | // Compiles the macro if its not in the cache, and executes the compiled macro |
| 116 | void Execute(u32 method, std::vector<u32>& parameters); | 116 | void Execute(u32 method, const std::vector<u32>& parameters); |
| 117 | 117 | ||
| 118 | protected: | 118 | protected: |
| 119 | virtual std::unique_ptr<CachedMacro> Compile(const std::vector<u32>& code) = 0; | 119 | virtual std::unique_ptr<CachedMacro> Compile(const std::vector<u32>& code) = 0; |