🎨 Committing clang-format changes

This commit is contained in:
Clang Robot 2026-04-18 00:46:04 +00:00
parent 9680c93bd1
commit b64c930b16
2 changed files with 19 additions and 16 deletions

View File

@ -143,7 +143,8 @@ namespace chaiscript {
m_engine.add(fun([this](const std::function<std::string(const std::string &)> &t_reader) { m_engine.add(fun([this](const std::function<std::string(const std::string &)> &t_reader) {
m_file_reader = t_reader; m_file_reader = t_reader;
}), "set_file_reader"); }),
"set_file_reader");
m_engine.add(fun([this]() { m_engine.dump_system(); }), "dump_system"); m_engine.add(fun([this]() { m_engine.dump_system(); }), "dump_system");
m_engine.add(fun([this](const Boxed_Value &t_bv) { m_engine.dump_object(t_bv); }), "dump_object"); m_engine.add(fun([this](const Boxed_Value &t_bv) { m_engine.dump_object(t_bv); }), "dump_object");

View File

@ -6,7 +6,7 @@
#pragma once #pragma once
//#include "hash.h" // #include "hash.h"
#include <string> #include <string>
// define fixed size integer types // define fixed size integer types
@ -19,7 +19,6 @@ typedef unsigned __int64 uint64_t;
#include <stdint.h> #include <stdint.h>
#endif #endif
/// compute SHA3 hash /// compute SHA3 hash
/** Usage: /** Usage:
SHA3 sha3; SHA3 sha3;
@ -37,18 +36,21 @@ class SHA3 //: public Hash
{ {
public: public:
/// algorithm variants /// algorithm variants
enum Bits { Bits224 = 224, Bits256 = 256, Bits384 = 384, Bits512 = 512 }; enum Bits { Bits224 = 224,
Bits256 = 256,
Bits384 = 384,
Bits512 = 512 };
/// same as reset() /// same as reset()
explicit SHA3(Bits bits = Bits256); explicit SHA3(Bits bits = Bits256);
/// compute hash of a memory block /// compute hash of a memory block
std::string operator()(const void* data, size_t numBytes); std::string operator()(const void *data, size_t numBytes);
/// compute hash of a string, excluding final zero /// compute hash of a string, excluding final zero
std::string operator()(const std::string& text); std::string operator()(const std::string &text);
/// add arbitrary number of bytes /// add arbitrary number of bytes
void add(const void* data, size_t numBytes); void add(const void *data, size_t numBytes);
/// return latest hash as hex characters /// return latest hash as hex characters
std::string getHash(); std::string getHash();
@ -58,7 +60,7 @@ public:
private: private:
/// process a full block /// process a full block
void processBlock(const void* data); void processBlock(const void *data);
/// process everything left in the internal buffer /// process everything left in the internal buffer
void processBuffer(); void processBuffer();