From 0943e0bd703b3a99ac2cc460d94c7f17e902e5da Mon Sep 17 00:00:00 2001 From: Tristan Matthews <tristan.matthews@savoirfairelinux.com> Date: Tue, 5 Mar 2013 15:40:02 -0500 Subject: [PATCH] audiorecord: cleanup --- daemon/src/audio/audiorecord.cpp | 3 +-- daemon/src/fileutils.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/daemon/src/audio/audiorecord.cpp b/daemon/src/audio/audiorecord.cpp index b68d65aa42..5bb4aa5762 100644 --- a/daemon/src/audio/audiorecord.cpp +++ b/daemon/src/audio/audiorecord.cpp @@ -130,7 +130,6 @@ void AudioRecord::setSndSamplingRate(int smplRate) void AudioRecord::setRecordingOption(FILE_TYPE type, int sndSmplRate, const std::string &path) { - std::stringstream s; std::string filePath; // use HOME directory if path is empty, or if path does not exist @@ -143,7 +142,7 @@ void AudioRecord::setRecordingOption(FILE_TYPE type, int sndSmplRate, const std: fileType_ = type; channels_ = 1; sndSmplRate_ = sndSmplRate; - savePath_ = (*filePath.rbegin() == '/') ? filePath : filePath + "/"; + savePath_ = (*filePath.rbegin() == DIR_SEPARATOR_CH) ? filePath : filePath + DIR_SEPARATOR_STR; } namespace { diff --git a/daemon/src/fileutils.h b/daemon/src/fileutils.h index 272404df8e..6f5bda13fb 100644 --- a/daemon/src/fileutils.h +++ b/daemon/src/fileutils.h @@ -42,7 +42,7 @@ #define DIR_SEPARATOR_STR "/" // Directory separator char -#define DIR_SEPARATOR_CH = '/' // Directory separator string +#define DIR_SEPARATOR_CH '/' // Directory separator string namespace fileutils { std::string get_home_dir(); -- GitLab