Merge lp:~paul-lucas/zorba/pjl-misc into lp:zorba

Proposed by Paul J. Lucas
Status: Merged
Approved by: Paul J. Lucas
Approved revision: 11341
Merged at revision: 11640
Proposed branch: lp:~paul-lucas/zorba/pjl-misc
Merge into: lp:zorba
Diff against target: 158 lines (+18/-44)
7 files modified
bin/debugger/command_arg.h (+1/-0)
src/runtime/numerics/numerics_impl.cpp (+2/-2)
src/util/csv_parser.cpp (+5/-8)
src/util/hash/hashtable.h (+2/-3)
src/zorbatypes/float.cpp (+0/-20)
src/zorbatypes/float.h (+6/-9)
src/zorbautils/hashset_atomic_itemh.h (+2/-2)
To merge this branch: bzr merge lp:~paul-lucas/zorba/pjl-misc
Reviewer Review Type Date Requested Status
Matthias Brantner Approve
Paul J. Lucas Approve
Review via email: mp+187605@code.launchpad.net

Commit message

Miscellaneous tweaks/fixes.

Description of the change

Miscellaneous tweaks/fixes.

To post a comment you must log in.
Revision history for this message
Paul J. Lucas (paul-lucas) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue starting for the following merge proposals:
https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/187605

Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Voting criteria failed for the following merge proposals:

https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/187605 :
Votes: {'Approve': 1}

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue result for https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/187605

Stage "CommitZorba" failed.

Check console output at http://jenkins.lambda.nu/job/CommitZorba/202/console to view the results.

lp:~paul-lucas/zorba/pjl-misc updated
11342. By Paul J. Lucas

Fixed comment.

Revision history for this message
Matthias Brantner (matthias-brantner) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue starting for the following merge proposals:
https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/187605

Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue succeeded - proposal merged!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/debugger/command_arg.h'
2--- bin/debugger/command_arg.h 2013-02-07 17:24:36 +0000
3+++ bin/debugger/command_arg.h 2013-09-25 21:52:49 +0000
4@@ -33,6 +33,7 @@
5 template<typename Tuple>
6 class CommandArgInstance {
7 public:
8+ virtual ~CommandArgInstance() { }
9 virtual int get_index() const = 0;
10 virtual const CommandArg<Tuple>* get_arg() const = 0;
11 virtual void insertValue(Tuple& t) = 0;
12
13=== modified file 'src/runtime/numerics/numerics_impl.cpp'
14--- src/runtime/numerics/numerics_impl.cpp 2013-06-11 05:40:04 +0000
15+++ src/runtime/numerics/numerics_impl.cpp 2013-09-25 21:52:49 +0000
16@@ -72,7 +72,7 @@
17
18 if (TypeOps::is_subtype(type, store::XS_DOUBLE))
19 {
20- if (result->getDoubleValue().isPos() || result->getDoubleValue().isPosZero())
21+ if (result->getDoubleValue() > 0 || result->getDoubleValue().isPosZero())
22 {
23 if (type != store::XS_DOUBLE)
24 GENV_ITEMFACTORY->createDouble(result, result->getDoubleValue());
25@@ -84,7 +84,7 @@
26 }
27 else if (TypeOps::is_subtype(type, store::XS_FLOAT))
28 {
29- if ( result->getFloatValue().isPos() || result->getFloatValue().isPosZero())
30+ if ( result->getFloatValue() > 0 || result->getFloatValue().isPosZero())
31 {
32 if (type != store::XS_FLOAT)
33 GENV_ITEMFACTORY->createFloat (result, result->getFloatValue());
34
35=== modified file 'src/util/csv_parser.cpp'
36--- src/util/csv_parser.cpp 2013-08-21 23:52:57 +0000
37+++ src/util/csv_parser.cpp 2013-09-25 21:52:49 +0000
38@@ -29,15 +29,12 @@
39 while ( is_->get( c ) ) {
40 if ( in_quote ) {
41 if ( quote_esc_ == quote_ ) { // ""
42- if ( c == quote_ ) {
43- c = is_->peek();
44- if ( is_->good() ) {
45- if ( c != quote_ ) {
46- in_quote = false;
47- continue;
48- }
49- is_->get();
50+ if ( c == quote_ && (c = is_->peek(), is_->good()) ) {
51+ if ( c != quote_ ) {
52+ in_quote = false;
53+ continue;
54 }
55+ is_->get();
56 }
57 } else { // \"
58 if ( c == quote_ ) {
59
60=== modified file 'src/util/hash/hashtable.h'
61--- src/util/hash/hashtable.h 2013-06-01 00:30:39 +0000
62+++ src/util/hash/hashtable.h 2013-09-25 21:52:49 +0000
63@@ -378,9 +378,8 @@
64 * @param hint An iterator providing a hint as to where to attempt to insert
65 * the new value.
66 * @param value The value to insert.
67- * @return If a value with the given key is already in the %hashtable_base,
68- * returns [i,false] where \a i is positioned at the existing element;
69- * otherwise returns [i,true] where \a i is positioned at the new element.
70+ * @return Returns an iterator positioned at either the new or existing
71+ * element.
72 */
73 iterator insert( const_iterator hint, value_type const &value );
74
75
76=== modified file 'src/zorbatypes/float.cpp'
77--- src/zorbatypes/float.cpp 2013-06-26 15:26:23 +0000
78+++ src/zorbatypes/float.cpp 2013-09-25 21:52:49 +0000
79@@ -295,26 +295,6 @@
80
81 ////////// miscellaneous //////////////////////////////////////////////////////
82
83-template<>
84-bool FloatImpl<double>::isNegZero() const {
85- if ( !value_ ) {
86- char const *const bytes = reinterpret_cast<char const*>( &value_ );
87- // test for little endian and big endian
88- return bytes[0] || bytes[7]; // TODO: depends on sizeof(double)
89- }
90- return false;
91-}
92-
93-template<>
94-bool FloatImpl<float>::isNegZero() const {
95- if ( !value_ ) {
96- char const *const bytes = reinterpret_cast<char const*>( &value_ );
97- // test for little endian and big endian
98- return bytes[0] || bytes[3]; // TODO: depends on sizeof(float)
99- }
100- return false;
101-}
102-
103 template<typename F>
104 FloatImpl<F> const& FloatImpl<F>::nan() {
105 static FloatImpl<F> const value( std::sqrt( -1.0 ) );
106
107=== modified file 'src/zorbatypes/float.h'
108--- src/zorbatypes/float.h 2013-06-26 15:53:43 +0000
109+++ src/zorbatypes/float.h 2013-09-25 21:52:49 +0000
110@@ -276,8 +276,6 @@
111 bool isFinite() const;
112 bool isPosInf() const;
113 bool isNegInf() const;
114- bool isNeg() const;
115- bool isPos() const;
116 bool isZero() const;
117 bool isPosZero() const;
118 bool isNegZero() const;
119@@ -968,13 +966,12 @@
120 }
121
122 template<typename F>
123-inline bool FloatImpl<F>::isNeg() const {
124- return value_ < 0;
125-}
126-
127-template<typename F>
128-inline bool FloatImpl<F>::isPos() const {
129- return value_ > 0;
130+inline bool FloatImpl<F>::isNegZero() const {
131+ if ( !value_ ) {
132+ char const *const bytes = reinterpret_cast<char const*>( &value_ );
133+ return bytes[0] || bytes[ sizeof( F ) - 1 ];
134+ }
135+ return false;
136 }
137
138 template<typename F>
139
140=== modified file 'src/zorbautils/hashset_atomic_itemh.h'
141--- src/zorbautils/hashset_atomic_itemh.h 2012-06-19 21:31:29 +0000
142+++ src/zorbautils/hashset_atomic_itemh.h 2013-09-25 21:52:49 +0000
143@@ -83,14 +83,14 @@
144 theCompareParam->theTimezone,
145 theCompareParam->theCollator);
146 }
147- catch(ZorbaException& e)
148+ catch(ZorbaException const& e)
149 {
150 if (e.diagnostic() == err::XPTY0004)
151 {
152 return false;
153 }
154
155- throw e;
156+ throw;
157 }
158 }
159

Subscribers

People subscribed via source and target branches