Skip to content

Commit 5becd6a

Browse files
committed
Update ex14_32.cpp
Simplify the implementation.
1 parent 18f15fe commit 5becd6a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ch14/ex14_32.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
#include <iostream>
44

55
StrBlobPtr&
6-
StrBlobPtr_pointer::operator *()
6+
StrBlobPtr_pointer::operator *() const
77
{
8-
return *(this->pointer);
8+
return *pointer;
99
}
1010

1111
StrBlobPtr*
12-
StrBlobPtr_pointer::operator ->()
12+
StrBlobPtr_pointer::operator ->() const
1313
{
14-
return & this->operator *();
14+
return pointer;
1515
}
1616

1717
int main()

0 commit comments

Comments
 (0)