Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 19, 2024
1 parent 6d1b4eb commit 192f4f2
Show file tree
Hide file tree
Showing 49 changed files with 49 additions and 49 deletions.
2 changes: 1 addition & 1 deletion .idea/Lithium.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion modules/lithium.cxxtools/src/csv2json.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,4 @@ auto csvToJson(std::string_view csv_file, std::string_view json_file,
}
} // namespace lithium::cxxtools

#endif
#endif
2 changes: 1 addition & 1 deletion src/atom/utils/qprocess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -407,4 +407,4 @@ void QProcess::Impl::startPosixProcess() {
}
#endif

} // namespace atom::utils
} // namespace atom::utils
2 changes: 1 addition & 1 deletion src/atom/utils/qtimezone.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,4 +156,4 @@ auto QTimeZone::isDaylightTime(const QDateTime& dateTime) const -> bool {
return (currentTime >= startDstT && currentTime < endDstT);
}

} // namespace atom::utils
} // namespace atom::utils
2 changes: 1 addition & 1 deletion src/atom/utils/stopwatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,4 +142,4 @@ auto StopWatcher::registerCallback(std::function<void()> callback,
pImpl->registerCallback(std::move(callback), milliseconds);
}

} // namespace atom::utils
} // namespace atom::utils
2 changes: 1 addition & 1 deletion src/atom/web/curl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,4 +176,4 @@ auto CurlWrapper::writeCallback(void *contents, size_t size, size_t nmemb,
str->append(static_cast<char *>(contents), realsize);
return realsize;
}
} // namespace atom::web
} // namespace atom::web
2 changes: 1 addition & 1 deletion src/atom/web/downloader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -342,4 +342,4 @@ void DownloadManager::onProgressUpdate(
impl_->onProgressUpdate(callback);
}

} // namespace atom::web
} // namespace atom::web
2 changes: 1 addition & 1 deletion src/atom/web/downloader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,4 @@ class DownloadManager {
std::unique_ptr<Impl> impl_; ///< 使用 Pimpl 隐藏实现细节
};

} // namespace atom::web
} // namespace atom::web
2 changes: 1 addition & 1 deletion src/atom/web/time.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -404,4 +404,4 @@ auto TimeManager::getNtpTime(const std::string &hostname) -> std::time_t {
return impl_->getNtpTime(hostname);
}

} // namespace atom::web
} // namespace atom::web
2 changes: 1 addition & 1 deletion src/atom/web/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,4 @@ auto checkAndKillProgramOnPort(int port) -> bool {
WSACleanup();
#endif
return true;
}
}
2 changes: 1 addition & 1 deletion src/client/alpaca/covercalibrator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,4 @@ void AlpacaCoverCalibrator::haltCover() { put("haltcover"); }

auto AlpacaCoverCalibrator::openCover() -> std::future<void> {
return asyncOperation([this]() { put("opencover"); }, "cover");
}
}
2 changes: 1 addition & 1 deletion src/client/alpaca/covercalibrator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ class AlpacaCoverCalibrator : public AlpacaDevice {
const std::string& operationName) -> std::future<void>;

std::future<void> currentOperation_;
};
};
2 changes: 1 addition & 1 deletion src/client/alpaca/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,4 +217,4 @@ void AlpacaDevice::checkError(const json& response) {
}
}
}
}
}
2 changes: 1 addition & 1 deletion src/client/alpaca/device.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,4 @@ class AlpacaDevice {
static std::mutex clientTransIdMutex;

std::unique_ptr<CURL, std::function<void(CURL*)>> curl_;
};
};
2 changes: 1 addition & 1 deletion src/client/alpaca/discovery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,4 +228,4 @@ void AlpacaDiscovery::Impl::receiveResponses(
std::cerr << "Failed to parse response: " << e.what() << std::endl;
}
}
}
}
2 changes: 1 addition & 1 deletion src/client/alpaca/dome.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,4 @@ auto AlpacaDome::slewToAzimuth(double azimuth) -> std::future<void> {

void AlpacaDome::syncToAzimuth(double azimuth) {
put("synctoazimuth", {{"Azimuth", std::to_string(azimuth)}});
}
}
2 changes: 1 addition & 1 deletion src/client/alpaca/dome.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ class AlpacaDome : public AlpacaDevice {
template <typename Func>
auto asyncOperation(Func&& func,
const std::string& operationName) -> std::future<void>;
};
};
2 changes: 1 addition & 1 deletion src/client/alpaca/filterwheel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ void AlpacaFilterWheel::waitForFilterChange() {
while (getPosition() == filterMoving) {
std::this_thread::sleep_for(std::chrono::milliseconds(pollIntervalMs));
}
}
}
2 changes: 1 addition & 1 deletion src/client/alpaca/filterwheel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ class AlpacaFilterWheel : public AlpacaDevice {
std::future<void> positionChangeFuture_;

void waitForFilterChange();
};
};
2 changes: 1 addition & 1 deletion src/client/alpaca/focuser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,4 @@ auto AlpacaFocuser::move(int position) -> std::future<void> {
moveThread_.join();
}
});
}
}
2 changes: 1 addition & 1 deletion src/client/alpaca/focuser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ class AlpacaFocuser : public AlpacaDevice {

std::atomic<bool> isMoving_{false};
std::thread moveThread_;
};
};
2 changes: 1 addition & 1 deletion src/client/alpaca/observingconditions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,4 @@ auto AlpacaObservingConditions::sensorDescription(std::string_view sensorName) c

auto AlpacaObservingConditions::timeSinceLastUpdate(std::string_view sensorName) const -> double {
return getNumericProperty<double>("timesincelastupdate");
}
}
2 changes: 1 addition & 1 deletion src/client/alpaca/observingconditions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ class AlpacaObservingConditions : public AlpacaDevice {
return std::nullopt;
}
}
};
};
2 changes: 1 addition & 1 deletion src/client/astap/astap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,4 +293,4 @@ ATOM_MODULE(solver_astap, [](Component &component) {
"Define a new solver instance.");

LOG_F(INFO, "Registered solver_astap module.");
});
});
2 changes: 1 addition & 1 deletion src/client/astrometry/astrometry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,4 +176,4 @@ ATOM_MODULE(astrometry, [](Component &component) {
component.defType<AstrometrySolver>("astrometry", "device.solver", "Astap solver");

LOG_F(INFO, "Registered astrometry module.");
});
});
2 changes: 1 addition & 1 deletion src/client/phd2/connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,4 @@ void GuiderConnection::terminate() {
m_thread_.request_stop();
m_thread_.join();
}
}
}
2 changes: 1 addition & 1 deletion src/client/phd2/data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,4 @@ void from_json(const json &jsonObj, GuideStats &guideStats) {
jsonObj.at("rmsDec").get_to(guideStats.rmsDec);
jsonObj.at("peakRa").get_to(guideStats.peakRa);
jsonObj.at("peakDec").get_to(guideStats.peakDec);
}
}
2 changes: 1 addition & 1 deletion src/client/phd2/profile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,4 +286,4 @@ void PHD2ProfileSettingHandler::printProfileDetails(
std::cout << "Profile " << profileName << " does not exist."
<< std::endl;
}
}
}
2 changes: 1 addition & 1 deletion src/client/phd2/profile.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ class PHD2ProfileSettingHandler {
private:
class Impl;
std::unique_ptr<Impl> pImpl; // Changed to camelCase
};
};
2 changes: 1 addition & 1 deletion src/client/planetarium/c2a.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,4 @@ C2A::~C2A() = default;

auto C2A::getTarget() -> DeepSkyObject { return pimpl_->getTarget(); }

auto C2A::getSite() -> Location { return pimpl_->getSite(); }
auto C2A::getSite() -> Location { return pimpl_->getSite(); }
2 changes: 1 addition & 1 deletion src/client/planetarium/c2a.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ class C2A {
private:
class Impl;
std::unique_ptr<Impl> pimpl_;
};
};
2 changes: 1 addition & 1 deletion src/client/planetarium/cdc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,4 @@ auto CartesDuCiel::getTarget()

auto CartesDuCiel::getSite() -> std::optional<std::pair<double, double>> {
return pimpl_->getSite();
}
}
2 changes: 1 addition & 1 deletion src/client/planetarium/hnsky.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,4 +133,4 @@ auto HNSKY::getSite() -> std::future<HNSKY::Location> {

auto HNSKY::getRotationAngle() -> std::future<double> {
return pimpl_->getRotationAngle();
}
}
2 changes: 1 addition & 1 deletion src/client/planetarium/skysafari.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,4 +286,4 @@ auto SkySafariController::isConnected() const -> bool {
return pImpl->isConnected();
}

auto SkySafariController::isParked() const -> bool { return pImpl->isParked(); }
auto SkySafariController::isParked() const -> bool { return pImpl->isParked(); }
2 changes: 1 addition & 1 deletion src/client/planetarium/skyx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,4 +156,4 @@ auto TheSkyX::getSite() -> std::future<json> { return pimpl_->getSite(); }

auto TheSkyX::getRotationAngle() -> std::future<double> {
return pimpl_->getRotationAngle();
}
}
2 changes: 1 addition & 1 deletion src/client/planetarium/skyx.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ class TheSkyX {
private:
class Impl;
std::unique_ptr<Impl> pimpl_;
};
};
2 changes: 1 addition & 1 deletion src/client/planetarium/stellarium.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,4 @@ auto Stellarium::getTarget() -> std::future<json> {

auto Stellarium::getRotationAngle() -> std::future<double> {
return pimpl_->getRotationAngle();
}
}
2 changes: 1 addition & 1 deletion src/client/platesolver/platesolver2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,4 @@ auto Platesolve2Solver::readResult(
}

return result;
}
}
2 changes: 1 addition & 1 deletion src/client/platesolver/platesolver2.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ class Platesolve2Solver : public AtomSolver {
[[nodiscard]] auto readResult(const std::string& outputFilePath,
int imageWidth,
int imageHeight) const -> PlateSolveResult;
};
};
2 changes: 1 addition & 1 deletion src/debug/command.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,4 +138,4 @@ void getEmbedComponentList() {
for (auto &component : Registry::instance().getAllComponentNames()) {
std::cout << component << std::endl;
}
}
}
2 changes: 1 addition & 1 deletion src/debug/history.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,4 +159,4 @@ void CommandHistory::loadFromFile() {
frequency_ = jsonObj["frequency"].get<decltype(frequency_)>();
}

} // namespace lithium::debug
} // namespace lithium::debug
2 changes: 1 addition & 1 deletion src/debug/output_style.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,4 @@ DataPrinter::DataPrinter(std::unique_ptr<OutputStyle> style)
void DataPrinter::print(
const std::vector<std::vector<std::string>>& data) const {
style_->print(data);
}
}
2 changes: 1 addition & 1 deletion src/debug/progress.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,4 +153,4 @@ void ProgressBar::wait() {

auto ProgressBar::getCurrent() const -> int { return current; }

} // namespace lithium::debug
} // namespace lithium::debug
2 changes: 1 addition & 1 deletion src/debug/suggestion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,4 @@ auto SuggestionEngine::calculateScore(const std::string& input,
return score;
}

} // namespace lithium::debug
} // namespace lithium::debug
2 changes: 1 addition & 1 deletion src/task/imagepath.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,4 +223,4 @@ auto ImagePatternParser::getDelimiter() const -> char {
return pImpl->getDelimiter();
}

} // namespace lithium
} // namespace lithium
2 changes: 1 addition & 1 deletion src/task/loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,4 @@ void TaskLoader::batchProcessDirectory(
batchAsyncProcess(filePaths, std::move(process), std::move(onComplete));
}

} // namespace lithium
} // namespace lithium
2 changes: 1 addition & 1 deletion src/task/loader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ class TaskLoader {

} // namespace lithium

#endif
#endif
2 changes: 1 addition & 1 deletion src/task/singlepool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,4 +176,4 @@ void SingleThreadPool::tryStartDetach(
}

void SingleThreadPool::quit() { start(nullptr); }
} // namespace lithium
} // namespace lithium
2 changes: 1 addition & 1 deletion src/task/task.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,4 +213,4 @@ auto Task::isTimeout() const -> bool {
return now - startTime >= timeout.value();
}
return false;
}
}

0 comments on commit 192f4f2

Please sign in to comment.