mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-07 13:53:38 +00:00
[C++] Fix code gen indentation when empty Print (#4313)
* Fix C++ code gen indentation when empty Print * Also commit modified tests/monster_test.bfbs
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
81ecc98e02
commit
6a7ec85e83
@@ -154,6 +154,9 @@ class FlatBufPrinter : public grpc_generator::Printer {
|
||||
}
|
||||
|
||||
void Print(const char *s) {
|
||||
if (s == nullptr || std::strlen(s) == 0) {
|
||||
return;
|
||||
}
|
||||
// Add this string, but for each part separated by \n, add indentation.
|
||||
for (;;) {
|
||||
// Current indentation.
|
||||
|
||||
Reference in New Issue
Block a user