Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Commit

Permalink
Fix/extend some examples
Browse files Browse the repository at this point in the history
  • Loading branch information
ROpdebee committed Jun 27, 2017
1 parent 1cb8c61 commit 6d06a89
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Framework X/examples/pointer-to-reference/templ.tmpl
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
void ?functionName(LargeData *data) {
void ?functionName(LargeData &data) {
?revelantBody
}
5 changes: 3 additions & 2 deletions Framework X/examples/rearrange-class-members/AB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@ class A {
class B {
const int a;
bool _foo;
int fooInt() { return static_cast<int>(_foo); }
public:
B(int _a, bool foo) : a(_a), _foo(foo) {}
B(const B &otherB) : a(otherB.a), _foo(otherB._foo) {}
B(const B &b) : a(b.a), _foo(b._foo) {}

bool foo() { return _foo; }
void foo(bool newFoo) { _foo = newFoo; }
int get_a() { return a; }

int performComputation() {
return a + static_cast<int>(_foo);
return a + fooInt();
}
};

0 comments on commit 6d06a89

Please sign in to comment.