mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-06-01 01:54:00 +00:00
readability updates: remove magic numbers, update comments
This commit is contained in:
@@ -44,6 +44,13 @@ class MockGenerator final : public DataGenerator {
|
||||
*/
|
||||
static size_t DeterministicHash(const Location& location);
|
||||
|
||||
// Hash stride constants for deterministic distribution across fixed-size
|
||||
// arrays. These coprime strides spread hash values uniformly without
|
||||
// clustering, ensuring diverse output across different hash inputs.
|
||||
static constexpr size_t kNounHashStride = 7;
|
||||
static constexpr size_t kDescriptionHashStride = 13;
|
||||
static constexpr size_t kBioHashStride = 11;
|
||||
|
||||
static constexpr std::array<std::string_view, 18> kBreweryAdjectives = {
|
||||
"Craft", "Heritage", "Local", "Artisan", "Pioneer", "Golden",
|
||||
"Modern", "Classic", "Summit", "Northern", "Riverstone", "Barrel",
|
||||
|
||||
@@ -42,7 +42,6 @@ class SqliteExportService final : public IExportService {
|
||||
void InitializeSchema() const;
|
||||
void PrepareStatements();
|
||||
void RollbackAndCloseNoThrow() noexcept;
|
||||
void FinalizeStatements() noexcept;
|
||||
|
||||
[[nodiscard]] std::filesystem::path BuildDatabasePath() const;
|
||||
[[nodiscard]] static std::string BuildLocationKey(const Location& location);
|
||||
|
||||
@@ -107,7 +107,6 @@ void StepStatement(const SqliteDatabaseHandle& db_handle,
|
||||
|
||||
sqlite3_int64 LastInsertRowId(const SqliteDatabaseHandle& db_handle);
|
||||
|
||||
std::string SerializeLocalLanguages(const std::vector<std::string>& local_languages);
|
||||
std::string SerializeVector(const std::vector<std::string>& str_vec);
|
||||
|
||||
} // namespace sqlite_export_service_internal
|
||||
|
||||
Reference in New Issue
Block a user