mirror of
https://git.suyu.dev/suyu/breakpad.git
synced 2025-12-27 17:55:29 +01:00
This change allows compiling the google-breakpad code using a global ::string class instead of std::string. For more details take a look at common/using_std_string.h
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@974 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
93cebf538e
commit
6de969a304
103 changed files with 521 additions and 385 deletions
|
|
@ -30,15 +30,16 @@
|
|||
#include <arpa/inet.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "common/using_std_string.h"
|
||||
#include "processor/binarystream.h"
|
||||
|
||||
namespace google_breakpad {
|
||||
using std::string;
|
||||
using std::vector;
|
||||
|
||||
binarystream &binarystream::operator>>(std::string &str) {
|
||||
binarystream &binarystream::operator>>(string &str) {
|
||||
u_int16_t length;
|
||||
*this >> length;
|
||||
if (eof())
|
||||
|
|
@ -83,7 +84,7 @@ binarystream &binarystream::operator>>(u_int64_t &u64) {
|
|||
return *this;
|
||||
}
|
||||
|
||||
binarystream &binarystream::operator<<(const std::string &str) {
|
||||
binarystream &binarystream::operator<<(const string &str) {
|
||||
if (str.length() > USHRT_MAX) {
|
||||
// truncate to 16-bit length
|
||||
*this << static_cast<u_int16_t>(USHRT_MAX);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue