diff --git a/src/media/media_codec.h b/src/media/media_codec.h
index c7c5308a6646769c67224d46699fbf154604e6cf..f9f8beeafca2629e9440463a9ed781bb7febb60e 100644
--- a/src/media/media_codec.h
+++ b/src/media/media_codec.h
@@ -237,7 +237,7 @@ public:
         return mkiLength_;
     }
 
-    operator bool() const {
+    inline explicit operator bool() const {
         return not tag_.empty();
     }
 
diff --git a/src/sip/sdes_negotiator.h b/src/sip/sdes_negotiator.h
index fd76d0204d4bc52e5153f9a1c57b4cc1bf1a7ec2..afc4b9a661c84b0226978ace9a6c31470426f9ac 100644
--- a/src/sip/sdes_negotiator.h
+++ b/src/sip/sdes_negotiator.h
@@ -104,7 +104,7 @@ class SdesNegotiator {
         ring::CryptoAttribute
         negotiate(const std::vector<std::string>& attributes) const;
 
-        operator bool() const {
+        inline explicit operator bool() const {
             return not localCapabilities_.empty();
         }
 
diff --git a/src/upnp/upnp_igd.cpp b/src/upnp/upnp_igd.cpp
index 1198b8b5285517a81bb0658954b677717b101098..b4d497178c41a02a2917270da259a34862d07a93 100644
--- a/src/upnp/upnp_igd.cpp
+++ b/src/upnp/upnp_igd.cpp
@@ -46,7 +46,7 @@ Mapping& Mapping::operator=(Mapping&& other)
     return *this;
 }
 
-bool operator== (Mapping &cMap1, Mapping &cMap2)
+bool operator== (const Mapping& cMap1, const Mapping& cMap2)
 {
     /* we don't compare the description because it doesn't change the function of the
      * mapping; we don't compare the IGD because for now we assume that we always
@@ -57,7 +57,7 @@ bool operator== (Mapping &cMap1, Mapping &cMap2)
             cMap1.type_ == cMap2.type_);
 }
 
-bool operator!= (Mapping &cMap1, Mapping &cMap2)
+bool operator!= (const Mapping& cMap1, const Mapping& cMap2)
 {
     return !(cMap1 == cMap2);
 }
diff --git a/src/upnp/upnp_igd.h b/src/upnp/upnp_igd.h
index 1075cf68ffdf9c1b3382785fefd3fb4e218972ed..3fdce01678488ddf30e5c79658de74fd0c010c2a 100644
--- a/src/upnp/upnp_igd.h
+++ b/src/upnp/upnp_igd.h
@@ -60,8 +60,8 @@ public:
 
     ~Mapping() = default;
 
-    friend bool operator== (Mapping &cRedir1, Mapping &cRedir2);
-    friend bool operator!= (Mapping &cRedir1, Mapping &cRedir2);
+    friend bool operator== (const Mapping& cRedir1, const Mapping& cRedir2);
+    friend bool operator!= (const Mapping& cRedir1, const Mapping& cRedir2);
 
     uint16_t      getPortExternal()    const { return port_external_; };
     std::string   getPortExternalStr() const { return ring::to_string(port_external_); };
@@ -79,7 +79,7 @@ public:
         return port_external_ == 0 or port_internal_ == 0 ? false : true;
     };
 
-    inline operator bool() const {
+    inline explicit operator bool() const {
         return isValid();
     }