Refactor our PRIVATE_EXCEPT_FOR_TLSCONFIG_CPP macro to be compatible with clang-format. Remove one use of it that is no longer needed now that actors can access private members.

This commit is contained in:
A.J. Beamon 2021-08-27 15:09:03 -07:00 committed by Aaron Molitor
parent a97bf380d3
commit a51988ff3a
2 changed files with 7 additions and 8 deletions

View File

@ -18,7 +18,7 @@
* limitations under the License.
*/
#define PRIVATE_EXCEPT_FOR_TLSCONFIG_CPP public
#define PRIVATE_EXCEPT_FOR_TLSCONFIG_CPP
#include "flow/TLSConfig.actor.h"
#undef PRIVATE_EXCEPT_FOR_TLSCONFIG_CPP

View File

@ -94,10 +94,6 @@ enum class TLSEndpointType { UNSET = 0, CLIENT, SERVER };
class TLSConfig;
template <typename T>
class LoadAsyncActorState;
// TODO: Remove this once this code is merged with master/to-be 7.0 and actors can access private variables.
#ifndef PRIVATE_EXCEPT_FOR_TLSCONFIG_CPP
#define PRIVATE_EXCEPT_FOR_TLSCONFIG_CPP private
#endif
class LoadedTLSConfig {
public:
@ -123,7 +119,10 @@ public:
void print(FILE* fp);
PRIVATE_EXCEPT_FOR_TLSCONFIG_CPP:
#ifndef PRIVATE_EXCEPT_FOR_TLSCONFIG_CPP
private:
#endif
std::string tlsCertBytes, tlsKeyBytes, tlsCABytes;
std::string tlsPassword;
std::vector<std::string> tlsVerifyPeers;
@ -206,8 +205,8 @@ public:
std::string getKeyPathSync() const;
std::string getCAPathSync() const;
PRIVATE_EXCEPT_FOR_TLSCONFIG_CPP:
ACTOR static Future<LoadedTLSConfig> loadAsync(const TLSConfig* self);
private:
ACTOR static Future<LoadedTLSConfig> loadAsync(const TLSConfig* self);
template <typename T>
friend class LoadAsyncActorState;