Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • xserver xserver
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 922
    • Issues 922
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 129
    • Merge requests 129
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • xorgxorg
  • xserverxserver
  • Merge requests
  • !187

Put the switch statement outside of loop

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Raul Fernandes requested to merge rgfernandes/xserver:colormap into master May 02, 2019
  • Overview 2
  • Commits 1
  • Pipelines 6
  • Changes 1

The switch statement is inside of the loop but it always resolves to same case. Put it outside to optimize the code. When the case is of one specific color, the other colors is always zero and makes no changes to final result. So, remove the unnecessary code.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: colormap