Tighten up C++ to work with clang.

This commit is contained in:
Warner Losh 2014-02-26 21:56:40 +00:00
parent 54dc2eefda
commit 97d59a4ffb
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=346232
3 changed files with 41 additions and 0 deletions

View file

@ -0,0 +1,18 @@
diff -ru work/seahaven-1.60/auto.C work.new/seahaven-1.60/auto.C
--- auto.C 2011-07-10 00:23:59.000000000 -0600
+++ auto.C 2014-02-25 15:10:30.000000000 -0700
@@ -486,12 +486,10 @@
class MoveCard : public Move {
Card& from;
- MoveCardToMemberFunction mcmf;
public:
- MoveCard(Card& f, Dest& d, MoveCardToMemberFunction mf)
- : Move(d), from(f), mcmf(mf) { }
+ MoveCard(Card& f, Dest& d)
+ : Move(d), from(f) { }
void DoIt() { dest.MoveTo(from); }
-// void DoIt() { dest.*mcmf(from); }
};
class MoveCardRange : public Move {

View file

@ -0,0 +1,11 @@
diff -ru work/seahaven-1.60/main.C work.new/seahaven-1.60/main.C
--- main.C 2011-07-10 19:35:12.000000000 -0600
+++ main.C 2014-02-25 15:07:08.000000000 -0700
@@ -31,6 +31,7 @@
exit(0);
}
+int
main(int argc, char **argv) {
const char *displayname = NULL;
const char *name = NULL;

View file

@ -0,0 +1,12 @@
diff -ru work/seahaven-1.60/seahaven.h work.new/seahaven-1.60/seahaven.h
--- seahaven.h 2011-07-10 18:42:44.000000000 -0600
+++ seahaven.h 2014-02-25 15:07:22.000000000 -0700
@@ -117,7 +117,7 @@
const char *message;
};
-typedef struct ScoreRec *Score;
+typedef class ScoreRec *Score;
class UndoListRec {
public: