explicitly declare namespaces and proto versions

develop
Myk Taylor 2022-12-10 18:06:53 -08:00
parent 18b099b367
commit facdb61e42
No known key found for this signature in database
13 changed files with 28 additions and 4 deletions

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

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

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

@ -708,7 +708,7 @@ static void create_boulders(color_ostream &out,
size_t remaining_items = coords.size(); size_t remaining_items = coords.size();
while (remaining_items > 0) { while (remaining_items > 0) {
int16_t batch_size = min(remaining_items, int16_t batch_size = std::min(remaining_items,
static_cast<size_t>(INT16_MAX)); static_cast<size_t>(INT16_MAX));
prod->count = batch_size; prod->count = batch_size;
remaining_items -= batch_size; remaining_items -= batch_size;
@ -725,7 +725,7 @@ static void create_boulders(color_ostream &out,
material.toString().c_str(), material.toString().c_str(),
ENUM_KEY_STR(item_type, prod->item_type).c_str(), ENUM_KEY_STR(item_type, prod->item_type).c_str(),
coords.size(), num_items); 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) { 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 //Attempts to provide a complete framework for reading everything from a fortress needed for vizualization
package AdventureControl; package AdventureControl;

@ -1,5 +1,6 @@
//Attempts to provide a complete framework for reading everything from a fortress needed for vizualization
syntax = "proto2"; syntax = "proto2";
//Attempts to provide a complete framework for reading everything from a fortress needed for vizualization
package DwarfControl; package DwarfControl;
option optimize_for = LITE_RUNTIME; 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 //Attempts to provide a complete framework for reading everything from a fortress needed for vizualization
package ItemdefInstrument; package ItemdefInstrument;

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

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

@ -1,3 +1,5 @@
syntax = "proto2";
package dfproto; package dfproto;
option optimize_for = LITE_RUNTIME; 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 //Attempts to provide a complete framework for reading everything from a fortress needed for vizualization
package proto.enums.ui_sidebar_mode; package proto.enums.ui_sidebar_mode;

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

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