Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
L ldpl
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 8
    • Issues 8
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Lartu
  • ldpl
  • Merge requests
  • !43

Merged
Created Apr 11, 2019 by Lartu@lartu🐕Maintainer

Re-use IF code for ELSE IF

  • Overview 2
  • Commits 1
  • Changes 1

Created by: dvkt

Instead of duplicating all the IF statements for ELSE IF, what do you think about checking for ELSE IF early and then just prepending }else to all the regular compiled if(...){ C++ code? That's what I've done in this patch, hopefully it makes sense.

The goal was to prevent simple mistakes in the future - if someone comes in and modifies IF x IS GREATER THAN x for some reason, they might forget to also modify ELSE IF x IS GREATER THAN x.

Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: github/fork/dvkt/compacted-else-if