mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-06-01 01:54:00 +00:00
Style audit: update code to strictly follow Google Style Guide
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
|
||||
namespace {
|
||||
|
||||
auto ExtractFinalJsonPayload(std::string raw_response) -> std::string {
|
||||
std::string ExtractFinalJsonPayload(std::string raw_response) {
|
||||
auto trim = [](std::string_view text) -> std::string_view {
|
||||
const std::size_t first = text.find_first_not_of(" \t\n\r");
|
||||
if (first == std::string_view::npos) {
|
||||
@@ -58,9 +58,8 @@ auto ExtractFinalJsonPayload(std::string raw_response) -> std::string {
|
||||
|
||||
} // namespace
|
||||
|
||||
auto LlamaGenerator::GenerateBrewery(const BreweryLocation& location,
|
||||
const std::string& region_context)
|
||||
-> BreweryResult {
|
||||
BreweryResult LlamaGenerator::GenerateBrewery(
|
||||
const BreweryLocation& location, const std::string& region_context) {
|
||||
/**
|
||||
* Preprocess and truncate region context to manageable size
|
||||
*/
|
||||
|
||||
@@ -9,8 +9,7 @@
|
||||
|
||||
#include "data_generation/mock_generator.h"
|
||||
|
||||
auto MockGenerator::DeterministicHash(const BreweryLocation& location)
|
||||
-> std::size_t {
|
||||
std::size_t MockGenerator::DeterministicHash(const BreweryLocation& location) {
|
||||
std::size_t seed = 0;
|
||||
boost::hash_combine(seed, location.city_name);
|
||||
boost::hash_combine(seed, location.country_name);
|
||||
|
||||
@@ -8,9 +8,8 @@
|
||||
|
||||
#include "data_generation/mock_generator.h"
|
||||
|
||||
auto MockGenerator::GenerateBrewery(const BreweryLocation& location,
|
||||
const std::string& /*region_context*/)
|
||||
-> BreweryResult {
|
||||
BreweryResult MockGenerator::GenerateBrewery(
|
||||
const BreweryLocation& location, const std::string& /*region_context*/) {
|
||||
const std::size_t hash = DeterministicHash(location);
|
||||
|
||||
const std::string& adjective =
|
||||
|
||||
Reference in New Issue
Block a user