-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/18823/
-----------------------------------------------------------
(Updated March 25, 2014, 11:35 a.m.)
Review request for mesos and Niklas Nielsen.
Changes
-------
Rebased the patch to the latest master revision. (Compiled again with Clang and
gcc. Ran "make check".)
>From now on, please follow this rule:
1. ALWAYS write "explicit" for ALL single arg constructors (that do not have
the constructed type as param type). No need to think about it, just write it.
2. Only if for some reason you do think about it and you conclude that you do
want implicit conversions, then replace "explicit" with "/*implicit*/".
(libprocess and stout will soon be adapted, too: MESOS-1057)
Bugs: MESOS-1055
https://issues.apache.org/jira/browse/MESOS-1055
Repository: mesos-git
Description
-------
Put "explicit" in front of all single-argument constructors in C++ Mesos source
code. (Omitted lib process, filed a separate issue for it.)
Diffs (updated)
-----
include/mesos/executor.hpp 7bc8eca
include/mesos/resources.hpp 59f495c
src/common/attributes.hpp a08cf18
src/common/lock.hpp 5af2f42
src/examples/long_lived_framework.cpp dc123cd
src/hdfs/hdfs.hpp 228f007
src/jvm/java/io.hpp fa0c60c
src/jvm/java/lang.hpp 5eb365d
src/jvm/java/net.hpp 7816251
src/jvm/jvm.hpp 2d3a7eb
src/log/log.hpp c2cb6cf
src/log/log.cpp d9b2687
src/log/network.hpp 2befea4
src/log/replica.hpp 6c51a58
src/log/replica.cpp 6db6d05
src/master/allocator.hpp 2e6a910
src/master/contender.hpp 0048ee0
src/master/contender.cpp 42d9c07
src/master/detector.hpp 533027a
src/master/detector.cpp 8b10061
src/master/hierarchical_allocator_process.hpp 3ec453a
src/master/master.hpp a8ed5ec
src/master/registrar.cpp 2b41700
src/python/native/proxy_executor.hpp 9f6b33f
src/python/native/proxy_scheduler.hpp cc92149
src/sasl/authenticator.hpp e1db783
src/slave/containerizer/isolator.hpp fc6c9ab
src/slave/monitor.hpp c042bc1
src/slave/slave.hpp 01b80df
src/state/leveldb.hpp 9708614
src/state/leveldb.cpp d60145b
src/state/protobuf.hpp d1c21c6
src/state/state.hpp 133752d
src/state/zookeeper.cpp bee6838
src/tests/containerizer.hpp 5686398
src/zookeeper/detector.hpp 73235c0
src/zookeeper/detector.cpp e186e51
src/zookeeper/group.hpp d1ead38
src/zookeeper/watcher.hpp 1db0386
Diff: https://reviews.apache.org/r/18823/diff/
Testing
-------
Compiled on Mac OS 10.9 with Clang 3.3 and on Ubuntu 13.10 with gcc 4.7.1. Ran
make check on both.
Also ran: python cpplint.py --filter=-,+runtime/explicit `find mesos -name
'*.cpp'; find mesos -name '*.hpp'`
And due to the patch, no more warnings about explicit constructors inside Mesos
source code.
Note that cpplint.py is now patched to allow '*.hpp' files, which it did not.
Thanks,
Bernd Mathiske