code clean
This commit is contained in:
14
main.cpp
14
main.cpp
@@ -74,6 +74,14 @@ inline PICout operator <<(PICout c, const SwitchChannel & v) {
|
||||
|
||||
int Acnt = 0;
|
||||
|
||||
struct MM {
|
||||
int x;
|
||||
double y;
|
||||
char c;
|
||||
PIPointd h;
|
||||
};
|
||||
|
||||
|
||||
class A {
|
||||
public:
|
||||
A() {moved = false; i = "constructor"; piCout << "A()"; ++Acnt;}
|
||||
@@ -86,10 +94,12 @@ public:
|
||||
A & operator =(A && a) {piSwap(i, a.i); a.moved = true; piCout << "= A&&)"; return *this;}
|
||||
PIString i;
|
||||
bool moved;
|
||||
MM m;
|
||||
static void F(int) {}
|
||||
};
|
||||
PIByteArray & operator <<(PIByteArray & ba, const A & v) {ba << v.i; return ba;}
|
||||
PIByteArray & operator >>(PIByteArray & ba, A & v) {ba >> v.i; return ba;}
|
||||
|
||||
inline PIByteArray & operator <<(PIByteArray & ba, const A & v) {ba << v.i << v.m; return ba;}
|
||||
inline PIByteArray & operator >>(PIByteArray & ba, A & v) {ba >> v.i >> v.m; return ba;}
|
||||
|
||||
|
||||
int main() {
|
||||
|
||||
Reference in New Issue
Block a user