Since the XD40 does not have a manual safety that discussion is moot. If you are carrying the pistol with one in the pipe, you are carrying the weapon as per the design the same with the P45
The original design submitted by John Browning to the US government for testing did not have a manual safety (only the grip safety and disconnector safety) and was intended by designed to be carried cocked and locked (Condition 1). The manual safety was added as a requirement of the US government. There as much been discussion of carry in condition 0. I would ask why would you carry without the manual safety engaged, especially considering that swiping it off safe does not interfere with the draw stroke, grip or slow the first shot. Especially considering that should you have an ND or bad shoot with death or injuries, that is just one more nail in the coffin at your trial.
Just my opinion, carry condition 1, it has worked for 100 years, why reinvent the wheel.