Skip to content

Commit

Permalink
Create overloaded constructor instead of default arguments (#159)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #159

Per discussion in D34216915, we should not make breaking API changes like this.

This diff creates the overloaded constructor. Note that this is a no-op because both versions continue to exist.

We are splitting up the two diffs because they are in different repositories (although in theory it is a safe change and shouldn't matter)

Reviewed By: chualynn

Differential Revision: D35198992

fbshipit-source-id: fb8aad9e857c261a9ba82cb7f93e6b9335b10610
  • Loading branch information
adshastri authored and facebook-github-bot committed Mar 29, 2022
1 parent 6412483 commit 5c194ec
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions fbpcf/mpc/EmpApp.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,21 @@ class EmpApp {
Party party,
const std::string& serverIp,
uint16_t port,
bool useTls = false,
const std::string& tlsDir = "")
bool useTls,
const std::string& tlsDir)
: party_{party},
serverIp_{serverIp},
port_{port},
useTls_{useTls},
tlsDir_{tlsDir} {}

EmpApp(Party party, const std::string& serverIp, uint16_t port)
: party_{party},
serverIp_{serverIp},
port_{port},
useTls_{false},
tlsDir_{""} {}

virtual ~EmpApp(){};

virtual void run() {
Expand All @@ -56,6 +63,6 @@ class EmpApp {
uint16_t port_; // Port to bind to, or port to connect to (for publisher or
// partner respectively)
bool useTls_; // whether to use TLS for communication
const std::string& tlsDir_; // directory that holds the TLS certificates/keys
const std::string tlsDir_; // directory that holds the TLS certificates/keys
};
} // namespace fbpcf

0 comments on commit 5c194ec

Please sign in to comment.