WIP making Operation and Precondition smaller

This commit is contained in:
2025-08-14 16:15:14 -04:00
parent 176922e394
commit 7ca50350e7
4 changed files with 148 additions and 144 deletions

View File

@@ -20,8 +20,7 @@ void print_stats(const CommitRequest &request) {
const auto &op = request.operations()[0];
std::cout << " First operation: "
<< (op.type == Operation::Type::Write ? "write" : "other")
<< " key=" << op.key
<< " value=" << (op.value ? op.value.value() : "none")
<< " param1=" << op.param1 << " param2=" << op.param2
<< std::endl;
}
}
@@ -85,7 +84,7 @@ int main(int argc, char *argv[]) {
})";
auto copy = sample_json;
if (request.parse_json(copy)) {
if (request.parse_json(copy.data(), copy.size())) {
print_stats(request);
} else {
std::cout << "✗ Failed to parse commit request" << std::endl;