Skip to content

Commit

Permalink
Formatted code
Browse files Browse the repository at this point in the history
  • Loading branch information
AjayBrahmakshatriya committed Aug 18, 2023
1 parent 79c0fcc commit 343c81f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
12 changes: 6 additions & 6 deletions include/builder/builder_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ class builder : builder_root {
builder_context *ctx = builder_context::current_builder_context;
ctx->expr_sequence.push_back(a);
}
builder(const unsigned int &a): builder((int)a) {}
builder(const unsigned int &a) : builder((int)a) {}

builder(const int &a) {
if (builder_precheck()) {
builder_from_sequence();
Expand All @@ -90,13 +90,13 @@ class builder : builder_root {

push_to_sequence(block_expr);
}
builder(const unsigned long long& a): builder((long long)a) {}
builder(const long long& a) {
builder(const unsigned long long &a) : builder((long long)a) {}
builder(const long long &a) {
if (builder_precheck()) {
builder_from_sequence();
return;
}

block::int_const::Ptr int_const = std::make_shared<block::int_const>();
tracer::tag offset = get_offset_in_function();
int_const->static_offset = offset;
Expand All @@ -105,7 +105,7 @@ class builder : builder_root {
builder_context::current_builder_context->add_node_to_sequence(int_const);
block_expr = int_const;

push_to_sequence(block_expr);
push_to_sequence(block_expr);
}

builder(const double &a) {
Expand Down
2 changes: 1 addition & 1 deletion samples/sample30.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ static void foo(void) {
dyn_var<long> e;
dyn_var<unsigned long> f;
dyn_var<long long> g;
dyn_var<unsigned long long> h = (unsigned long long) 4;
dyn_var<unsigned long long> h = (unsigned long long)4;
dyn_var<char> i;
dyn_var<unsigned char> j;
dyn_var<float> k;
Expand Down
3 changes: 2 additions & 1 deletion src/blocks/c_code_generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ void c_code_generator::visit(var_expr::Ptr a) {
}
void c_code_generator::visit(int_const::Ptr a) {
oss << a->value;
if (a->is_64bit) oss << "ll";
if (a->is_64bit)
oss << "ll";
}
void c_code_generator::visit(double_const::Ptr a) {
oss << std::setprecision(15);
Expand Down

0 comments on commit 343c81f

Please sign in to comment.