Simon Giesecke
5a343fc27b
Problem: stream_t/router_t access data member of base class
...
Solution: pull up functionality to base class
2018-05-29 15:05:27 +02:00
Simon Giesecke
ab3895a470
Problem: duplicated code in stream_t & router_t
...
Solution: pulled up to routing_socket_base_t
2018-05-29 15:05:27 +02:00
Simon Giesecke
09fab930b3
Problem: xwrite_activated duplicated between stream_t and router_t
...
Solution: pull up into routing_socket_base_t
2018-05-29 15:05:27 +02:00
Simon Giesecke
c9d6ef3035
Problem: Member outpipes is duplicate between router_t and stream_t
...
Solution: extract into common base class routing_socket_base_t, for now as protected
2018-05-29 15:05:26 +02:00
Simon Giesecke
728eddfcfd
Problem: socket_base_t::connect_routing_id is protected and only used in router_t and stream_t
...
Solution: add an intermediary base class routing_socket_base_t, move common functionality there and make connect_routing_id private
2018-05-29 15:05:26 +02:00
Simon Giesecke
25461a78dd
Problem: members of mechanmism_t are needlessly protected
...
Solution: make them private
2018-05-29 11:08:22 +02:00
Luca Boccassi
2dfdcaff26
Merge pull request #3141 from sigiesec/analyze
...
More code style improvements
2018-05-28 19:22:56 +01:00
Simon Giesecke
47dcd84f21
Problem: C-style casts
...
Solution: replace by reinterpret_casts or avoid entirely
2018-05-28 18:47:07 +02:00
Simon Giesecke
917a4a8e10
Problem: reinterpret_casts between unsigned char* and char*
...
Solution: use char* from the beginning
2018-05-28 18:47:07 +02:00
Simon Giesecke
0a43c66a32
Problem: magic literals in zap_client.cpp
...
Solution: extracted constants
2018-05-28 18:47:07 +02:00
Simon Giesecke
7c2d1c1824
Problem: magic literals for UCHAR_MAX
...
Solution: use UCHAR_MAX constant instead
2018-05-28 18:46:50 +02:00
Simon Giesecke
a4c817e736
Problem: magic number "2" in socket_base.cpp
...
Solution: calculate from field sizes
2018-05-28 18:45:41 +02:00
Simon Giesecke
d75ec5e055
Problem: produce_* functions always return 0
...
Solution: change return type to void, and remove redundant result checks
2018-05-28 17:53:46 +02:00
Simon Giesecke
7f880c256f
Problem: magic numbers and data duplication in plain_*.cpp
...
Solution: extract constants / move to plain_common.hpp
2018-05-28 17:53:46 +02:00
Simon Giesecke
8269b23e56
Problem: magic numbers and code duplication in msg.cpp
...
Solution: extract constants and unified cases
2018-05-28 17:53:44 +02:00
Simon Giesecke
18000a213f
Problem: magic numbers in mechanism_base.cpp
...
Solution: extract constants
2018-05-28 17:53:44 +02:00
Simon Giesecke
abca9f6bc1
Problem: Magic numbers in plain_server.cpp
...
Solution: introduced constants
2018-05-28 17:53:44 +02:00
Simon Giesecke
2da6629e0f
Problem: Magic numbers "1" and "100" in signaler.cpp
...
Solution: introduced constants, use std::min/std::max instead of control structures
2018-05-28 17:53:43 +02:00
Simon Giesecke
a6060674b4
Problem: Magic numbers "32" and "128" in tcp_address.cpp
...
Solution: introduced constants
2018-05-28 17:53:43 +02:00
Simon Giesecke
93e75fd695
Problem: Magic numbers "6" and "7" in null_mechanism.cpp
...
Solution: introduced constants
2018-05-28 17:53:42 +02:00
Simon Giesecke
c05db7f025
Problem: Magic numbers "1" and "6" in null_mechanism.cpp
...
Solution: introduced constants
2018-05-28 17:53:42 +02:00
Simon Giesecke
ff27dd01f0
Problem: Magic numbers "1" and "4" in mechanism.cpp
...
Solution: introduced constants
2018-05-28 17:53:42 +02:00
Simon Giesecke
7c9d058cdb
Problem: Magic number "2" in ip_resolver.cpp
...
Solution: introduced constant
2018-05-28 17:53:41 +02:00
Simon Giesecke
16bb62e6f7
Problem: ctx_t::_slots is a plain array
...
Solution: use a std::vector instead
2018-05-28 17:53:41 +02:00
Simon Giesecke
a0a60e80ca
Problem: Magic number "2" in ctx.cpp
...
Solution: introduced constant
2018-05-28 17:53:40 +02:00
Simon Giesecke
bbc903884f
Merge pull request #3140 from bluca/clang_tautological
...
Problem: build broken with clang 6 on Android NDK 17
2018-05-28 15:30:42 +02:00
Luca Boccassi
58d13395ec
Problem: clang 6 warns about comparisons on 64 bit
...
Solution: ignore tautological-constant-compare warnings, as they
might be useless on 64 bit but they are not on 32 bit where sizeof
size_t != sizeof uint64_t
2018-05-28 14:06:41 +01:00
Luca Boccassi
624c142365
Problem: static analysis warning about ifdef typo
...
Solution: fix it
2018-05-28 12:32:23 +01:00
Luca Boccassi
2d1bb07f8d
Merge pull request #3139 from sigiesec/style-improvements
...
Code style improvements
2018-05-27 15:44:27 +01:00
Simon Giesecke
779d120fa3
Problem: tests do not follow naming style
...
Solution: apply naming style
2018-05-27 13:24:08 +02:00
Simon Giesecke
d767909b50
Problem: old C-style casts used
...
Solution: replace by static_cast/reinterpret_cast
2018-05-27 13:24:07 +02:00
Simon Giesecke
e3c73d9881
Problem: inconsistent naming style for private data members, conflicts with naming of local variables and member functions
...
Solution: apply and check _lower_case naming style for private data members
2018-05-27 13:24:07 +02:00
Simon Giesecke
06cfd0d8ad
Problem: unclear why QueryPerformanceFrequency is called for every call of QueryPerformanceCounter
...
Solution: add a comment
2018-05-27 13:24:07 +02:00
Simon Giesecke
97ba02bc2f
Problem: redundant empty dtor
...
Solution: removed
2018-05-27 13:24:06 +02:00
Simon Giesecke
6ef67f13e3
Problem: use of C-style casts and magic literals
...
Solution: replace by static_cast, and introduce appropriate constants
2018-05-27 13:24:06 +02:00
Luca Boccassi
089746959d
Merge pull request #3137 from sigiesec/disable-parallel-testing
...
Problem: VS2008/2010/2017 tests fail if run in parallel
2018-05-26 19:19:48 +01:00
Simon Giesecke
0c74e8a0ad
Problem: cmake install is not tested
...
Solution: run cmake --build --target install instead of msbuild to build on appveyor
2018-05-26 18:56:00 +02:00
Simon Giesecke
a1efc68516
Problem: appveyor CI takes a long time
...
Solution: run some builds only on master or *full-ci* branches
2018-05-26 18:56:00 +02:00
Simon Giesecke
33ba7e14b3
Problem: VS2008/2010/2017 tests fail if run in parallel
...
Solution: disabled parallel testing for these VS versions
2018-05-26 18:56:00 +02:00
Luca Boccassi
fae88633d7
Merge pull request #3138 from sigiesec/fix-various-style-issues
...
Fix various code style issues
2018-05-26 12:08:12 +01:00
Simon Giesecke
37344d0b7c
Problem: redundant old-style void argument declarations
...
Solution: remove
2018-05-26 09:34:45 +02:00
Simon Giesecke
12a97bb769
Problem: redundant else after return
...
Solution: remove else
2018-05-26 09:34:45 +02:00
Simon Giesecke
21498700ef
Problem: integer literals assigned to bool variables
...
Solution: replace by bool literals
2018-05-26 09:34:45 +02:00
Simon Giesecke
eacc805646
Problem: complex unnecessary ternary expressions
...
Solution: simplify to comparison against 0
2018-05-26 09:34:44 +02:00
Simon Giesecke
1432011277
Problem: inconsistent local variable naming
...
Solution: configured clang-tidy check and applied fixes
2018-05-26 09:34:44 +02:00
Simon Giesecke
c581f43c97
Problem: parameter naming style inconsistent
...
Solution: define and apply parameter naming style: lower_case_
2018-05-26 09:34:44 +02:00
Luca Boccassi
79d5ac3dee
Merge pull request #3135 from sigiesec/fix-heartbeat-ttl-max
...
Fix ZMQ_HEARTBEAT_TTL maximum value check
2018-05-25 15:57:45 +01:00
Simon Giesecke
763760988f
Problem: VS2008 has no definition of UINT16_MAX
...
Solution: provide definition based on _UI16_MAX
2018-05-25 15:13:07 +02:00
Simon Giesecke
8b030a9256
Problem: no tests for corner cases of setsockopt ZMQ_HEARTBEAT_TTL
...
Solution: added tests
2018-05-25 15:13:07 +02:00
Simon Giesecke
d90e70c1cf
Problem: maximum allowed value for ZMQ_HEARTBEAT_TTL is wrong
...
Solution: use UINT16_MAX
2018-05-25 15:06:11 +02:00