license: remove FSF postal address from boiler plate license text
[pulseview.git] / pv / data / segment.cpp
index bc08fd07917564d86e13f35f3d37ad20dcae64e9..9afc8ea2d5b49a9f65ea31fb76f10c97069ac002 100644 (file)
@@ -14,8 +14,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
 #include "segment.hpp"
@@ -52,7 +51,7 @@ uint64_t Segment::get_sample_count() const
        return sample_count_;
 }
 
-double Segment::start_time() const
+const pv::util::Timestamp& Segment::start_time() const
 {
        return start_time_;
 }
@@ -98,9 +97,8 @@ void Segment::append_data(void *data, uint64_t samples)
 
        // Ensure there's enough capacity to copy.
        const uint64_t free_space = capacity_ - sample_count_;
-       if (free_space < samples) {
+       if (free_space < samples)
                set_capacity(sample_count_ + samples);
-       }
 
        memcpy((uint8_t*)data_.data() + sample_count_ * unit_size_,
                data, samples * unit_size_);