Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development: 1.6.0 #3141

Open
wants to merge 236 commits into
base: master
Choose a base branch
from
Open

Development: 1.6.0 #3141

wants to merge 236 commits into from

Conversation

ethouris
Copy link
Collaborator

@ethouris ethouris commented Mar 13, 2025

The PR for complete review and CI. Assigned PRs:

OTHERS:

Mikołaj Małecki added 30 commits November 9, 2020 14:07
…fore changing the flag. Otherwise it would confuse the closing function when used on a connected socket
Comment on lines 452 to 468
/*
const T& operator[](int index) const
{
if (index < 0 || static_cast<size_t>(index) >= m_size)
throw_invalid_index(index);

return m_entries[index];
}

T& operator[](int index)
{
if (index < 0 || static_cast<size_t>(index) >= m_size)
throw_invalid_index(index);

return m_entries[index];
}
*/

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.

Copilot Autofix AI 1 day ago

To fix the problem, we should remove the commented-out code block from lines 452 to 468. This will eliminate the distraction and potential confusion caused by the presence of commented-out code. The existing functionality of the operator[] functions will remain unchanged.

Suggested changeset 1
srtcore/utilities.h

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/srtcore/utilities.h b/srtcore/utilities.h
--- a/srtcore/utilities.h
+++ b/srtcore/utilities.h
@@ -451,19 +451,3 @@
 
-    /*
-    const T& operator[](int index) const
-    {
-        if (index < 0 || static_cast<size_t>(index) >= m_size)
-            throw_invalid_index(index);
 
-        return m_entries[index];
-    }
-
-    T& operator[](int index)
-    {
-        if (index < 0 || static_cast<size_t>(index) >= m_size)
-            throw_invalid_index(index);
-
-        return m_entries[index];
-    }
-    */
 
EOF
@@ -451,19 +451,3 @@

/*
const T& operator[](int index) const
{
if (index < 0 || static_cast<size_t>(index) >= m_size)
throw_invalid_index(index);

return m_entries[index];
}

T& operator[](int index)
{
if (index < 0 || static_cast<size_t>(index) >= m_size)
throw_invalid_index(index);

return m_entries[index];
}
*/

Copilot is powered by AI and may make mistakes. Always verify output.
Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
54.2% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

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.

3 participants