From 8e9dd5494ad4d4e5bc14c6d9069d4a15ab790da6 Mon Sep 17 00:00:00 2001
From: Owen <owenca@users.noreply.github.com>
Date: Sun, 8 Jan 2017 19:55:51 +0000
Subject: [PATCH] added copy constructor for BStringRef (PVS issue 32)
---
headers/os/support/String.h | 1 +
src/kits/support/String.cpp | 7 +++++++
2 files changed, 8 insertions(+)
diff --git a/headers/os/support/String.h b/headers/os/support/String.h
index 9e33c3c..144f791 100644
a
|
b
|
operator!=(const char* str, const BString& string)
|
609 | 609 | |
610 | 610 | class BStringRef { |
611 | 611 | public: |
| 612 | BStringRef(const BStringRef& rc); |
612 | 613 | BStringRef(BString& string, int32 position); |
613 | 614 | ~BStringRef() {} |
614 | 615 | |
diff --git a/src/kits/support/String.cpp b/src/kits/support/String.cpp
index 5533f03..91dbcdb 100644
a
|
b
|
private:
|
135 | 135 | // #pragma mark - BStringRef |
136 | 136 | |
137 | 137 | |
| 138 | BStringRef::BStringRef(const BStringRef& rc) |
| 139 | : |
| 140 | fString(rc.fString), fPosition(rc.fPosition) |
| 141 | { |
| 142 | } |
| 143 | |
| 144 | |
138 | 145 | BStringRef::BStringRef(BString& string, int32 position) |
139 | 146 | : |
140 | 147 | fString(string), fPosition(position) |