Skip to content

Commit 37965e2

Browse files
trondndaverigby
authored andcommitted
Add consts to dump methods
Change-Id: I5fcbfd24cede40c6baa04bb42533c2994de4fe27 Reviewed-on: http://review.couchbase.org/110274 Tested-by: Build Bot <[email protected]> Reviewed-by: Dave Rigby <[email protected]>
1 parent 90ff955 commit 37965e2

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

include/mcbp/mcbp.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ void dump(const Header& header, std::ostream& out);
5555
* @param buffer the buffer containing the data
5656
* @param out Where to dump the data
5757
*/
58-
void dumpStream(cb::byte_buffer buffer, std::ostream& out);
59-
58+
void dumpStream(cb::const_byte_buffer buffer, std::ostream& out);
6059

6160
/**
6261
* Print a byte dump of a buffer in the following format:
@@ -69,8 +68,9 @@ void dumpStream(cb::byte_buffer buffer, std::ostream& out);
6968
* specified in the buffer, and this is may be used if the
7069
* buffer to display is a small segment of a larger blob)
7170
*/
72-
void dumpBytes(cb::byte_buffer buffer, std::ostream& out, size_t offset = 0);
73-
71+
void dumpBytes(cb::const_byte_buffer buffer,
72+
std::ostream& out,
73+
size_t offset = 0);
7474

7575
namespace gdb {
7676
/**
@@ -81,7 +81,7 @@ namespace gdb {
8181
* 0x7f43387d7e82: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
8282
* 0x7f43387d7e8a: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
8383
*/
84-
std::vector<uint8_t> parseDump(cb::byte_buffer blob);
84+
std::vector<uint8_t> parseDump(cb::const_byte_buffer blob);
8585
} // namespace gdb
8686

8787
namespace lldb {
@@ -92,7 +92,7 @@ namespace lldb {
9292
* 0xaddr: 81 0d 00 01 04 00 00 00 00 00 00 06 00 00 00 06 ................
9393
* 0xaddr: 14 bf f4 26 8a e0 00 00 00 00 00 00 61 61 81 0a .��&.�......aa..
9494
*/
95-
std::vector<uint8_t> parseDump(cb::byte_buffer blob);
95+
std::vector<uint8_t> parseDump(cb::const_byte_buffer blob);
9696
}
9797

9898
namespace sla {

protocol/mcbp/dump.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
namespace cb {
3535
namespace mcbp {
3636

37-
void dumpBytes(cb::byte_buffer buffer, std::ostream& out, size_t offset) {
37+
void dumpBytes(cb::const_byte_buffer buffer, std::ostream& out, size_t offset) {
3838
out << std::hex;
3939
size_t nbytes = 0;
4040
while (nbytes < buffer.size()) {
@@ -578,7 +578,7 @@ void cb::mcbp::dump(const uint8_t* packet, std::ostream& out) {
578578
dump(*reinterpret_cast<const cb::mcbp::Header*>(packet), out);
579579
}
580580

581-
void cb::mcbp::dumpStream(cb::byte_buffer buffer, std::ostream& out) {
581+
void cb::mcbp::dumpStream(cb::const_byte_buffer buffer, std::ostream& out) {
582582
size_t offset = 0;
583583

584584
while ((offset + sizeof(Header)) <= buffer.len) {

protocol/mcbp/gdb_dump_parser.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace cb {
2626
namespace mcbp {
2727
namespace gdb {
2828

29-
std::vector<uint8_t> parseDump(cb::byte_buffer blob) {
29+
std::vector<uint8_t> parseDump(cb::const_byte_buffer blob) {
3030
std::vector<uint8_t> ret;
3131

3232
const uint8_t* end = blob.data() + blob.size();

protocol/mcbp/lldb_dump_parser.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace cb {
2626
namespace mcbp {
2727
namespace lldb {
2828

29-
std::vector<uint8_t> parseDump(cb::byte_buffer blob) {
29+
std::vector<uint8_t> parseDump(cb::const_byte_buffer blob) {
3030
std::vector<uint8_t> ret;
3131

3232
const uint8_t* end = blob.data() + blob.size();

0 commit comments

Comments
 (0)