Cleanup: Remove redundant return statement #118176

Open
Germain-Le-Chapelain wants to merge 1 commits from Germain-Le-Chapelain/blender:codesimplification into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
First-time contributor

Signed-off-by: Germain Le Chapelain germain.lechapelain@lanvaux.fr

It simplifies the code :|

Signed-off-by: Germain Le Chapelain <germain.lechapelain@lanvaux.fr> It simplifies the code :|
Germain-Le-Chapelain added 1 commit 2024-02-13 03:01:44 +01:00
65e7367cc3 - Code simplification
Signed-off-by: Germain Le Chapelain <germain.lechapelain@lanvaux.fr>
Iliya Katushenock added this to the Pipeline, Assets & IO project 2024-02-13 12:14:50 +01:00
Thomas Dinges changed title from - Code simplification to Cleanup: Remove redundant return statement 2024-02-13 16:29:11 +01:00

@aras_p Something for you maybe to check on? :)

@aras_p Something for you maybe to check on? :)
Hans Goudey requested changes 2024-02-13 16:45:45 +01:00
Hans Goudey left a comment
Member

Thanks for the PR. But the description should explain why this code was unnecessary. Deleting any code would be a simplification, the important part is that it doesn't change behavior :)

Thanks for the PR. But the description should explain why this code was unnecessary. Deleting any code would be a simplification, the important part is that it doesn't change behavior :)

LGTM. Yeah no idea why the code is like this, the extra return statement seems to be clearly unnecessary.

LGTM. Yeah no idea why the code is like this, the extra return statement seems to be clearly unnecessary.
Author
First-time contributor

I think it’s software engineering/the logic of reading OBJ:

If create_geometry was doing only that: creating the geometry, as oppose to perhaps create the geometry, we could simplify further.

I don’t know all the cases of OBJ files yet but I have a strong suspicion that the very 1st call to it is superfluous as well, in which case we could always create (on o, cstype and the likes) we could completely rid of the branching logic inside.

(I’m more in my other tentative PR for the surfaces 🙂
For that I just thought I’m gonna try delving in what render those working NURBS surfaces from the Windows rendering debugger thing if I can.)

Thank you for the look at!
(I had another one on Gitignore for when the dependency library are built on Windows.)

I think it’s software engineering/the logic of reading OBJ: If `create_geometry` was doing only that: creating the geometry, as oppose to _perhaps_ create the geometry, we could simplify further. I don’t know all the cases of OBJ files yet but I have a strong suspicion that the very 1st call to it is superfluous as well, in which case we could always create (on `o`, `cstype` and the likes) we could completely rid of the branching logic inside. (I’m more in my other tentative PR for the surfaces 🙂 For that I just thought I’m gonna try delving in what render those working NURBS surfaces from the Windows rendering debugger thing if I can.) Thank you for the look at! (I had another one on Gitignore for when the dependency library are built on Windows.)
Merge conflict checking is in progress. Try again in few moments.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u codesimplification:Germain-Le-Chapelain-codesimplification
git checkout Germain-Le-Chapelain-codesimplification
Sign in to join this conversation.
No reviewers
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#118176
No description provided.