summaryrefslogtreecommitdiff
path: root/src/binary-reader-objdump.cc
diff options
context:
space:
mode:
authorBen Smith <binjimin@gmail.com>2017-02-24 10:45:40 -0800
committerGitHub <noreply@github.com>2017-02-24 10:45:40 -0800
commit25f189ffdbd953f7799ad98ea2d62fc822e54728 (patch)
tree4aa4668806d818c3a40a2ae1504d61e00c3514cc /src/binary-reader-objdump.cc
parentb86721bdeb746ff86db73385f449a4af882501b2 (diff)
downloadwabt-25f189ffdbd953f7799ad98ea2d62fc822e54728.tar.gz
wabt-25f189ffdbd953f7799ad98ea2d62fc822e54728.tar.bz2
wabt-25f189ffdbd953f7799ad98ea2d62fc822e54728.zip
Change NULL -> nullptr (#315)
Also switch to using C++11.
Diffstat (limited to 'src/binary-reader-objdump.cc')
-rw-r--r--src/binary-reader-objdump.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/binary-reader-objdump.cc b/src/binary-reader-objdump.cc
index 18173e81..50eb9df5 100644
--- a/src/binary-reader-objdump.cc
+++ b/src/binary-reader-objdump.cc
@@ -99,7 +99,8 @@ static WabtResult begin_section(WabtBinaryReaderContext* ctx,
if (section_match) {
printf("\nContents of section %s:\n", name);
wabt_write_memory_dump(context->out_stream, context->data + ctx->offset,
- size, ctx->offset, WABT_PRINT_CHARS, NULL, NULL);
+ size, ctx->offset, WABT_PRINT_CHARS, nullptr,
+ nullptr);
}
break;
case WABT_DUMP_DISASSEMBLE:
@@ -259,7 +260,7 @@ static void log_opcode(Context* ctx,
static WabtResult on_opcode_bare(WabtBinaryReaderContext* ctx) {
Context* context = (Context*)ctx->user_data;
- log_opcode(context, ctx->data, 0, NULL);
+ log_opcode(context, ctx->data, 0, nullptr);
return WABT_OK;
}
@@ -315,7 +316,7 @@ WabtResult on_br_table_expr(WabtBinaryReaderContext* ctx,
Context* context = (Context*)ctx->user_data;
size_t immediate_len = ctx->offset - context->current_opcode_offset;
/* TODO(sbc): Print targets */
- log_opcode(context, ctx->data, immediate_len, NULL);
+ log_opcode(context, ctx->data, immediate_len, nullptr);
return WABT_OK;
}
@@ -323,7 +324,7 @@ static WabtResult on_end_expr(void* user_data) {
Context* context = (Context*)user_data;
context->indent_level--;
assert(context->indent_level >= 0);
- log_opcode(context, NULL, 0, NULL);
+ log_opcode(context, nullptr, 0, nullptr);
return WABT_OK;
}
@@ -354,7 +355,7 @@ static WabtResult on_opcode_block_sig(WabtBinaryReaderContext* ctx,
if (num_types)
log_opcode(context, ctx->data, 1, "%s", wabt_type_name(*sig_types));
else
- log_opcode(context, ctx->data, 1, NULL);
+ log_opcode(context, ctx->data, 1, nullptr);
context->indent_level++;
return WABT_OK;
}
@@ -653,7 +654,7 @@ static WabtResult on_data_segment_data(uint32_t index,
Context* ctx = (Context*)user_data;
if (should_print_details(ctx)) {
wabt_write_memory_dump(ctx->out_stream, src_data, size, 0, WABT_PRINT_CHARS,
- " - ", NULL);
+ " - ", nullptr);
}
return WABT_OK;
}