Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Unified Diff: src/IceCompileServer.h

Issue 1494753003: cleanup main (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: changes suggested by stichnot Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/IceCompileServer.h
diff --git a/src/IceCompileServer.h b/src/IceCompileServer.h
index 9b02f92c85259263ff07f89787d811b741f6c80d..06f3f5220e30b06db7f12b4ad71b335c9d7e6d29 100644
--- a/src/IceCompileServer.h
+++ b/src/IceCompileServer.h
@@ -41,12 +41,11 @@ namespace Ice {
/// request immediately. When run in the browser, it blocks waiting for a
/// request.
class CompileServer {
- CompileServer() = delete;
CompileServer(const CompileServer &) = delete;
CompileServer &operator=(const CompileServer &) = delete;
public:
- explicit CompileServer(Compiler &Comp) : Comp(Comp) {}
+ explicit CompileServer() {}
Jim Stichnoth 2015/12/07 17:37:13 You don't need "explicit" for a zero-arg ctor. Ma
rkotlerimgtec 2015/12/07 18:32:07 Done.
virtual ~CompileServer() = default;
@@ -55,10 +54,15 @@ public:
virtual ErrorCode &getErrorCode() { return LastError; }
void transferErrorCode(ErrorCodes Code) { LastError.assign(Code); }
+ int runit() {
+ run();
+ return getErrorCode().value();
+ }
+
protected:
- Compiler &getCompiler() const { return Comp; }
+ Compiler &getCompiler() { return Comp; }
- Compiler &Comp;
+ Compiler Comp;
ErrorCode LastError;
};
@@ -69,8 +73,8 @@ class CLCompileServer : public CompileServer {
CLCompileServer &operator=(const CLCompileServer &) = delete;
public:
- CLCompileServer(Compiler &Comp, int argc, char **argv)
- : CompileServer(Comp), argc(argc), argv(argv) {}
+ CLCompileServer(int argc, char **argv)
Jim Stichnoth 2015/12/07 17:37:13 Be sure to run "make format", this should fit on o
rkotlerimgtec 2015/12/07 18:32:07 Done.
+ : argc(argc), argv(argv) {}
~CLCompileServer() final = default;

Powered by Google App Engine
This is Rietveld 408576698