-
Notifications
You must be signed in to change notification settings - Fork 380
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
Use uniform initialization #2331
Conversation
* TAO/docs/tutorials/Quoter/Event_Service/Stock_Consumer.cpp: * TAO/docs/tutorials/Quoter/Event_Service/index.html: * TAO/docs/tutorials/Quoter/RT_Event_Service/Stock_Consumer.cpp: * TAO/docs/tutorials/Quoter/RT_Event_Service/index.html: * TAO/examples/Simulator/Event_Supplier/Event_Con.cpp: * TAO/interop-tests/wchar/client.cpp: * TAO/orbsvcs/DevGuideExamples/ValueTypes/Notify/consumer.cpp: * TAO/orbsvcs/LifeCycle_Service/Criteria_Evaluator.cpp: * TAO/orbsvcs/orbsvcs/CosEvent/CEC_DynamicImplementation.cpp: * TAO/orbsvcs/orbsvcs/FaultTolerance/FT_ClientPolicy_i.cpp: * TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/FTEC_Event_Channel_Impl.cpp: * TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Request_Context_Repository.cpp: * TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Set_Update_Interceptor.cpp: * TAO/orbsvcs/orbsvcs/Notify/Property_T.cpp: * TAO/orbsvcs/orbsvcs/PortableGroup/PG_Property_Set_Find.h: * TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_CredentialsAcquirer.cpp: * TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/EchoEventConsumer_i.cpp: * TAO/tao/Messaging/ExceptionHolder_i.cpp:
WalkthroughThis pull request updates pointer initializations across various modules. Many instances of pointers being set to Changes
Sequence Diagram(s)(No sequence diagrams provided as the changes are purely syntactical and do not alter control flow.) Possibly related PRs
Poem
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
TAO/orbsvcs/LifeCycle_Service/Criteria_Evaluator.cpp (1)
50-50
: Consider usingnullptr
for consistency.For consistency with the other modernized null checks in this file, consider updating this comparison as well.
- if (any_ptr == 0) + if (any_ptr == nullptr)TAO/orbsvcs/orbsvcs/Notify/Property_T.cpp (1)
118-118
: Consider modernizing the null check and simplifying the condition.The condition can be modernized and simplified for better readability.
- if ((value >>= extract_type) && extract_type != 0) // make sure we get something valid. + if ((value >>= extract_type) && extract_type != nullptr) // make sure we get something valid.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (18)
TAO/docs/tutorials/Quoter/Event_Service/Stock_Consumer.cpp
(1 hunks)TAO/docs/tutorials/Quoter/Event_Service/index.html
(1 hunks)TAO/docs/tutorials/Quoter/RT_Event_Service/Stock_Consumer.cpp
(1 hunks)TAO/docs/tutorials/Quoter/RT_Event_Service/index.html
(1 hunks)TAO/examples/Simulator/Event_Supplier/Event_Con.cpp
(2 hunks)TAO/interop-tests/wchar/client.cpp
(2 hunks)TAO/orbsvcs/DevGuideExamples/ValueTypes/Notify/consumer.cpp
(1 hunks)TAO/orbsvcs/LifeCycle_Service/Criteria_Evaluator.cpp
(1 hunks)TAO/orbsvcs/orbsvcs/CosEvent/CEC_DynamicImplementation.cpp
(1 hunks)TAO/orbsvcs/orbsvcs/FaultTolerance/FT_ClientPolicy_i.cpp
(1 hunks)TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/FTEC_Event_Channel_Impl.cpp
(1 hunks)TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Request_Context_Repository.cpp
(1 hunks)TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Set_Update_Interceptor.cpp
(1 hunks)TAO/orbsvcs/orbsvcs/Notify/Property_T.cpp
(1 hunks)TAO/orbsvcs/orbsvcs/PortableGroup/PG_Property_Set_Find.h
(1 hunks)TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_CredentialsAcquirer.cpp
(1 hunks)TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/EchoEventConsumer_i.cpp
(1 hunks)TAO/tao/Messaging/ExceptionHolder_i.cpp
(1 hunks)
✅ Files skipped from review due to trivial changes (7)
- TAO/orbsvcs/orbsvcs/PortableGroup/PG_Property_Set_Find.h
- TAO/tao/Messaging/ExceptionHolder_i.cpp
- TAO/examples/Simulator/Event_Supplier/Event_Con.cpp
- TAO/docs/tutorials/Quoter/Event_Service/Stock_Consumer.cpp
- TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Set_Update_Interceptor.cpp
- TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/FTEC_Event_Channel_Impl.cpp
- TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Request_Context_Repository.cpp
⏰ Context from checks skipped due to timeout of 90000ms (20)
- GitHub Check: ubuntu-20.04 g++-10 ACE for TAO
- GitHub Check: ubuntu-22.04 clang++-14
- GitHub Check: ubuntu-20.04 clang++-12
- GitHub Check: ubuntu-20.04 clang++-11
- GitHub Check: ubuntu-20.04 clang++-10
- GitHub Check: VS2022Release64
- GitHub Check: VS2022Debug64
- GitHub Check: VS2022WChar
- GitHub Check: VS2019Debug64Cxx20
- GitHub Check: VS2019Debug64Cxx17
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: VS2019Release32
- GitHub Check: VS2019Debug32
- GitHub Check: VS2019Release64
- GitHub Check: VS2019Debug64
- GitHub Check: VS2019WChar
- GitHub Check: macos-14-C++
- GitHub Check: MINGW64-gcc
- GitHub Check: macos-13-C++
- GitHub Check: ubuntu-20.04 g++-10
🔇 Additional comments (11)
TAO/docs/tutorials/Quoter/RT_Event_Service/Stock_Consumer.cpp (1)
38-38
: LGTM! Modern pointer initialization.The change from
0
to{}
for pointer initialization aligns with modern C++ practices while maintaining the same semantics.TAO/orbsvcs/tests/Event/Mcast/RTEC_MCast_Federated/EchoEventConsumer_i.cpp (1)
26-26
: LGTM! Explicit pointer initialization.Adding explicit initialization with
{}
improves code safety by ensuring the pointer starts in a known state.TAO/orbsvcs/LifeCycle_Service/Criteria_Evaluator.cpp (1)
29-29
: LGTM! Modern pointer handling.The changes to use
{}
for initialization andnullptr
for comparison align with modern C++ practices.Also applies to: 34-34
TAO/orbsvcs/orbsvcs/Notify/Property_T.cpp (1)
116-116
: LGTM! Modern pointer initialization.The change to use
{}
for pointer initialization aligns with modern C++ practices.TAO/orbsvcs/orbsvcs/CosEvent/CEC_DynamicImplementation.cpp (1)
91-91
: LGTM! Modern initialization style.The change to use uniform initialization with
{}
is a good modernization that maintains the same behavior while being more explicit about the initialization intent.TAO/orbsvcs/orbsvcs/FaultTolerance/FT_ClientPolicy_i.cpp (1)
105-105
: LGTM! Safe policy value initialization.The uniform initialization style is appropriate here, as the code properly validates the pointer immediately after initialization and handles failure cases.
TAO/orbsvcs/DevGuideExamples/ValueTypes/Notify/consumer.cpp (1)
121-121
: LGTM! Consistent event pointer initialization.The uniform initialization aligns with modern C++ practices and maintains the safety of the event handling code.
TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_CredentialsAcquirer.cpp (1)
129-129
: LGTM! Secure credentials data initialization.The uniform initialization is appropriate for security-sensitive code, maintaining explicit initialization while ensuring proper validation of the credentials data.
TAO/interop-tests/wchar/client.cpp (1)
162-162
: LGTM! Modernized pointer initialization.The changes improve code safety by using uniform initialization syntax to explicitly initialize pointers to null.
Also applies to: 175-175
TAO/docs/tutorials/Quoter/RT_Event_Service/index.html (1)
77-77
: LGTM! Modernized pointer initialization.The change improves code safety by using uniform initialization syntax to explicitly initialize the pointer to null.
TAO/docs/tutorials/Quoter/Event_Service/index.html (1)
80-80
: LGTM! Modernized pointer initialization.The change improves code safety by using uniform initialization syntax to explicitly initialize the pointer to null.
Summary by CodeRabbit