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

701 - Fix warning "Use of BITWISE AND to check if a flag is set" (#849) #896

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions compendium/ConfigurationAdmin/src/CMActivator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ namespace cppmicroservices
// manually
for (auto const& bundle : context.GetBundles())
{
if (cppmicroservices::Bundle::State::STATE_ACTIVE == bundle.GetState())
if (cppmicroservices::Bundle::State::STATE_ACTIVE & bundle.GetState())
{
cppmicroservices::BundleEvent evt(cppmicroservices::BundleEvent::BUNDLE_STARTED, bundle);
BundleChanged(evt);
Expand Down Expand Up @@ -178,11 +178,11 @@ namespace cppmicroservices
}

// TODO: revisit to include LAZY_ACTIVATION when supported by the framework
if (cppmicroservices::BundleEvent::BUNDLE_STARTED == eventType)
if (cppmicroservices::BundleEvent::BUNDLE_STARTED & eventType)
{
CreateExtension(bundle);
}
else if (cppmicroservices::BundleEvent::BUNDLE_STOPPING == eventType)
else if (cppmicroservices::BundleEvent::BUNDLE_STOPPING & eventType)
{
RemoveExtension(bundle);
}
Expand Down
6 changes: 3 additions & 3 deletions compendium/DeclarativeServices/src/SCRActivator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ namespace cppmicroservices
// manually
for (auto const& bundle : context.GetBundles())
{
if (bundle.GetState() == cppmicroservices::Bundle::State::STATE_ACTIVE)
if (bundle.GetState() & cppmicroservices::Bundle::State::STATE_ACTIVE)
{
cppmicroservices::BundleEvent evt(cppmicroservices::BundleEvent::BUNDLE_STARTED, bundle);
BundleChanged(evt);
Expand Down Expand Up @@ -215,11 +215,11 @@ namespace cppmicroservices
}

// TODO: revisit to include LAZY_ACTIVATION when supported by the framework
if (eventType == cppmicroservices::BundleEvent::BUNDLE_STARTED)
if (eventType & cppmicroservices::BundleEvent::BUNDLE_STARTED)
{
CreateExtension(bundle);
}
else if (eventType == cppmicroservices::BundleEvent::BUNDLE_STOPPING)
else if (eventType & cppmicroservices::BundleEvent::BUNDLE_STOPPING)
{
DisposeExtension(bundle);
}
Expand Down
Loading