Skip to content

Types etc#4

Open
ThomasHowarth wants to merge 93 commits intodevelopmentfrom
types_etc
Open

Types etc#4
ThomasHowarth wants to merge 93 commits intodevelopmentfrom
types_etc

Conversation

@ThomasHowarth
Copy link
Copy Markdown
Owner

No description provided.

Comment thread Source/PeleLMeX_Soot.cpp
PeleLM::clipSootMoments()
{
for (int lev = 0; lev <= finest_level; lev++) {
SootData* sd = soot_model->getSootData_d();

Check notice

Code scanning / CodeQL

Unused local variable Note

Variable sd is not used.

Copilot Autofix

AI 8 months ago

To resolve the "unused local variable" issue, simply remove the declaration and assignment of the variable sd on line 57. This reduces code clutter and improves readability, without affecting program behaviour. You do not need to add or modify imports or methods. Only remove the line with the unused variable.


Suggested changeset 1
Source/PeleLMeX_Soot.cpp

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/Source/PeleLMeX_Soot.cpp b/Source/PeleLMeX_Soot.cpp
--- a/Source/PeleLMeX_Soot.cpp
+++ b/Source/PeleLMeX_Soot.cpp
@@ -54,7 +54,6 @@
 void
 PeleLM::clipSootMoments()
 {
-  SootData* sd = soot_model->getSootData_d();
   for (int lev = 0; lev <= finest_level; ++lev) {
     auto* ldata_p = getLevelDataPtr(lev, AmrNewTime);
 #ifdef AMREX_USE_OMP
EOF
@@ -54,7 +54,6 @@
void
PeleLM::clipSootMoments()
{
SootData* sd = soot_model->getSootData_d();
for (int lev = 0; lev <= finest_level; ++lev) {
auto* ldata_p = getLevelDataPtr(lev, AmrNewTime);
#ifdef AMREX_USE_OMP
Copilot is powered by AI and may make mistakes. Always verify output.
Unable to commit as this autofix suggestion is now outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants