diff options
| author | Teddy Wing | 2021-03-07 13:22:52 +0100 |
|---|---|---|
| committer | Teddy Wing | 2021-03-07 13:22:52 +0100 |
| commit | 0ddc422df631d85b4981f03d7ac93535e563a794 (patch) | |
| tree | 641dc19a051a1d084686cc162af9df16637f2720 | |
| parent | 5fd5ad3d85ff91b2c3bcf8fd6db26bdde4cc7646 (diff) | |
| download | Re-Good-Catalina-Invert-Colours-0ddc422df631d85b4981f03d7ac93535e563a794.tar.bz2 | |
Invert: Move `inverted_gamma` to static const
Since this is a literal, it can be declared statically.
| -rw-r--r-- | Invert.m | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -2,6 +2,8 @@ #define MAX_DISPLAYS 8 +static const CGGammaValue INVERTED_GAMMA[2] = {1, 0}; + @implementation Invert - (id)init @@ -31,8 +33,6 @@ - (void)invertColors { - const CGGammaValue inverted_gamma[2] = {1, 0}; - CGDirectDisplayID active_displays[MAX_DISPLAYS]; uint32_t display_count; @@ -49,9 +49,9 @@ error = CGSetDisplayTransferByTable( active_displays[i], 2, - inverted_gamma, - inverted_gamma, - inverted_gamma + INVERTED_GAMMA, + INVERTED_GAMMA, + INVERTED_GAMMA ); if (error != kCGErrorSuccess) { // TODO: error handling |
