aboutsummaryrefslogtreecommitdiffstats
path: root/src/asn1/ber_dec.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-09-13 15:21:31 +0000
committerlloyd <[email protected]>2010-09-13 15:21:31 +0000
commit4a7e9edcc92b08a285ea24549fd8c813d10b63b9 (patch)
tree569e357cbc1bd2b195c1b10b281f6c0bbf01fd33 /src/asn1/ber_dec.cpp
parent27d79c87365105d6128afe9eaf8a82383976ed44 (diff)
First set of changes for avoiding use implicit vector->pointer conversions
Diffstat (limited to 'src/asn1/ber_dec.cpp')
-rw-r--r--src/asn1/ber_dec.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/asn1/ber_dec.cpp b/src/asn1/ber_dec.cpp
index 1bbcd72c2..f2873c177 100644
--- a/src/asn1/ber_dec.cpp
+++ b/src/asn1/ber_dec.cpp
@@ -103,10 +103,10 @@ u32bit find_eoc(DataSource* ber)
while(true)
{
- const u32bit got = ber->peek(buffer, buffer.size(), data.size());
+ const u32bit got = ber->peek(&buffer[0], buffer.size(), data.size());
if(got == 0)
break;
- data.append(buffer, got);
+ data.append(&buffer[0], got);
}
DataSource_Memory source(data);
@@ -206,7 +206,7 @@ BER_Object BER_Decoder::get_next_object()
u32bit length = decode_length(source);
next.value.resize(length);
- if(source->read(next.value, length) != length)
+ if(source->read(&next.value[0], length) != length)
throw BER_Decoding_Error("Value truncated");
if(next.type_tag == EOC && next.class_tag == UNIVERSAL)
@@ -234,7 +234,7 @@ BER_Decoder BER_Decoder::start_cons(ASN1_Tag type_tag,
BER_Object obj = get_next_object();
obj.assert_is_a(type_tag, ASN1_Tag(class_tag | CONSTRUCTED));
- BER_Decoder result(obj.value, obj.value.size());
+ BER_Decoder result(&obj.value[0], obj.value.size());
result.parent = this;
return result;
}
@@ -415,7 +415,7 @@ BER_Decoder& BER_Decoder::decode(BigInt& out,
obj.value[j] = ~obj.value[j];
}
- out = BigInt(obj.value, obj.value.size());
+ out = BigInt(&obj.value[0], obj.value.size());
if(negative)
out.flip_sign();