Simplify serial port redirect (#13234)

This commit is contained in:
Scott Lahteine
2019-02-23 22:53:01 -06:00
committed by GitHub
parent 88cc1d1a31
commit e15354e387
22 changed files with 575 additions and 876 deletions

View File

@@ -133,5 +133,5 @@ public:
inline void restore() { ref_ = val_; }
};
#define REMEMBER(N,X, ...) restorer<typeof(X)> N##_restorer(X, ##__VA_ARGS__)
#define RESTORE(N) N##_restorer.restore()
#define REMEMBER(N,X, ...) restorer<typeof(X)> restorer_##N(X, ##__VA_ARGS__)
#define RESTORE(N) restorer_##N.restore()