Merge pull request #2491 from myk002/myk_protobuf_good_parts

explicitly declare namespaces and proto versions
develop
Myk 2022-12-10 18:15:33 -08:00 committed by GitHub
commit f40a9cf876
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 28 additions and 4 deletions

@ -1,3 +1,5 @@
syntax = "proto2";
package dfproto;
option optimize_for = LITE_RUNTIME;

@ -1,3 +1,5 @@
syntax = "proto2";
package dfproto;
option optimize_for = LITE_RUNTIME;

@ -1,3 +1,5 @@
syntax = "proto2";
package dfproto;
option optimize_for = LITE_RUNTIME;

@ -708,8 +708,8 @@ static void create_boulders(color_ostream &out,
size_t remaining_items = coords.size();
while (remaining_items > 0) {
int16_t batch_size = min(remaining_items,
static_cast<size_t>(INT16_MAX));
int16_t batch_size = std::min(remaining_items,
static_cast<size_t>(INT16_MAX));
prod->count = batch_size;
remaining_items -= batch_size;
prod->produce(unit, &out_products, &out_items, &in_reag, &in_items,
@ -725,7 +725,7 @@ static void create_boulders(color_ostream &out,
material.toString().c_str(),
ENUM_KEY_STR(item_type, prod->item_type).c_str(),
coords.size(), num_items);
num_items = min(num_items, entry.second.size());
num_items = std::min(num_items, entry.second.size());
}
for (size_t i = 0; i < num_items; ++i) {

@ -1,3 +1,5 @@
syntax = "proto2";
//Attempts to provide a complete framework for reading everything from a fortress needed for vizualization
package AdventureControl;

@ -1,5 +1,6 @@
//Attempts to provide a complete framework for reading everything from a fortress needed for vizualization
syntax = "proto2";
//Attempts to provide a complete framework for reading everything from a fortress needed for vizualization
package DwarfControl;
option optimize_for = LITE_RUNTIME;

@ -1,3 +1,5 @@
syntax = "proto2";
//Attempts to provide a complete framework for reading everything from a fortress needed for vizualization
package ItemdefInstrument;

@ -1,3 +1,5 @@
syntax = "proto2";
//Attempts to provide a complete framework for reading everything from a fortress needed for vizualization
package RemoteFortressReader;

@ -1,3 +1,5 @@
syntax = "proto2";
//Describes a very basic material structure for the map embark
package isoworldremote;

@ -1,3 +1,5 @@
syntax = "proto2";
package dfproto;
option optimize_for = LITE_RUNTIME;

@ -1,3 +1,5 @@
syntax = "proto2";
//Attempts to provide a complete framework for reading everything from a fortress needed for vizualization
package proto.enums.ui_sidebar_mode;

@ -33,6 +33,9 @@
#include <fstream>
using std::endl;
using std::string;
using std::vector;
using namespace DFHack;
using namespace df::enums;
using namespace google::protobuf;

@ -1,3 +1,5 @@
syntax = "proto2";
package dfstockpiles;
option optimize_for = LITE_RUNTIME;