Skip to content

Commit 54f66fb

Browse files
Fix remaining compiler warnings
1 parent c8623cb commit 54f66fb

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

examples/warehouse/main.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ class WareHouseClient {
2222
void doWarehouseStuff(IClientConnector &clientConnector) {
2323
JsonRpcClient client(clientConnector, version::v2);
2424
WareHouseClient appClient(client);
25-
Product p = {"0xff", 22.4, "Product 1", category::cash_carry};
25+
Product p;
26+
p.id = "0xff";
27+
p.price = 22.4;
28+
p.name = "Product 1";
29+
p.cat = category::cash_carry;
2630
cout << "Adding product: " << std::boolalpha << appClient.AddProduct(p) << "\n";
2731

2832
Product p2 = appClient.GetProduct("0xff");
@@ -54,4 +58,4 @@ int main() {
5458
doWarehouseStuff(httpClient);
5559

5660
return 0;
57-
}
61+
}

examples/warehouse/types.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
enum class category { order, cash_carry };
55

66
struct Product {
7+
public:
8+
Product() : id(), price(), name(), cat() {}
79
std::string id;
810
double price;
911
std::string name;

0 commit comments

Comments
 (0)